OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: Ogre Procedural Geometry Library
View page
Source of version: 25
(current)
{DIV(class="clearRight")}{img fileId="1982" align="right" thumb="y" rel="box[g]" width="300" desc="click to enlarge" stylebox="border"} {DIV} {DIV(class="clearRight")}{img fileId="1983" align="right" thumb="y" rel="box[g]" width="300" desc="click to enlarge" stylebox="border"}{DIV} __Ogre Procedural__ is a procedural geometry generation library, targeted at Ogre3D __Autor:__ [http://www.ogre3d.org/forums/memberlist.php?mode=viewprofile&u=4982|Mikachu] (Michael Broutin) __Licence:__ MIT License Source code and downloads you find on the [https://github.com/OGRECave/ogre-procedural|project page]. Documentation : [https://ogrecave.github.io/ogre-procedural/|User Manual and API Reference] If you have questions, ask in the [http://www.ogre3d.org/addonforums/viewforum.php?f=33|forum]. !!Features Existing features in current release (0.2): * Primitives : Box, RoundedBox, Plane, Sphere, IcoSphere, Cylinder, Tube, Capsule, Cone, Torus and Torus knot * Extrusion * Lathe * Triangulation * Smooth splines by [http://en.wikipedia.org/wiki/B%C3%A9zier_curve|Bézier Curves] (also usable for extrusion) * Constructive solid geometry in 2D Planned / not yet in the official release: * A plug-in for the scene editor ((Ogitor)) * SVG import (currently without Bézier import) * OpenStreetMap data import * Object description by XML file (as alternative to source code) !!Screenshots {DIV()}{IMG(fileId="2061",thumb="y",rel="box[g]",width="300",align="left",stylebox="border",desc="Rendering of openstreetmap XML data")}{IMG}{DIV} {DIV()}{IMG(fileId="2062",thumb="y",rel="box[g]",width="300",align="left",stylebox="border",desc="click to enlarge")}{IMG}{DIV} %clear% !!Download Downloads are available in the [https://github.com/OGRECave/ogre-procedural|download section] of the project page. Source package is also available for all platforms (CMake based project files) !!Usage Examples __Create a sphere:__ {CODE(wrap="1", colors="c++")} #include "Procedural.h" Procedural::SphereGenerator().setRadius(5.f).setUTile(.5f).realizeMesh("mySphere"); mSceneMgr->createEntity("mySphere"); {CODE} __Create a pipeline:__ {CODE(wrap="1", colors="c++")}Procedural::Path p = Procedural::BezierPath().addPoint(0,5,0).addPoint(0,4,10).addPoint(10,5,10).close().realizePath(); Procedural::Shape s = Procedural::CircleShape().setRadius(1.5).realizeShape(); Procedural::Extruder().setExtrusionPath(&p).setShapeToExtrude(&s).realizeMesh("extrudedMesh");{CODE} !!Advanced example This example shows how to create a shape by a vector graphic application and how to use it for extruding. Create SVG shape (e.g. with Inkscape): {img fileId="2059"} Load the shape and define a path: {img fileId="2058"} Extrude: {img fileId="2060"} {CODE(wrap="1", colors="c++")} // load inkscape .svg file into a shape: Shape shape = Shape(); shape.loadFromSVG("inkscape-test.svg", "path2985"); // construct the spline we want to extrude along: CatmullRomSpline3 pp; pp.addPoint(0,-5,0).addPoint(50,-5,250).addPoint(500,-5,500).setNumSeg(10); Path line = pp.realizePath(); // extruder and mesh generation putMesh(shape.realizeMesh()); putMesh(line.realizeMesh(),1); Extruder e; putMesh(e.setShapeToExtrude(&shape).setExtrusionPath(&line).realizeMesh(),1); {CODE} !!See also * [http://www.ogre3d.org/addonforums/viewforum.php?f=33|Ogre Addons subforum] * [http://www.ogre3d.org/forums/viewtopic.php?f=11&t=60773|Original forum topic (locked)] * ((ManualObject)) * ((GeometricMesh)) - Creating various geometric/geodesic shapes * ((Mogre Procedural Geometry Library)) - A C# port for ((MOGRE|Mogre))
Search by Tags
Search Wiki by Freetags
Latest Changes
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
MogreSocks
Critter AI
Mogre Add-ons
MOGRE
Mogre MyGUI wrapper
MOGRE Editable Terrain Manager
...more
Search
Find
Advanced
Search Help
Online Users
62 online users