24#include <OgreProcedural/Procedural.h>
36 SetValues(
"GeometryController",
"Geometry Controller",
true,
false);
46 return Procedural::PlaneGenerator().setScale(1.0 /
sbs->
UnitScale).setNumSegX(segments_x).setNumSegY(segments_y).setSizeX(size_x).setSizeY(size_y).setUTile(utile).setVTile(vtile).realizeMesh(parent->
GetNameBase() + name);
51 return Procedural::SphereGenerator().setScale(1.0 /
sbs->
UnitScale).setRadius(radius).setUTile(utile).setVTile(vtile).setNumRings(rings).setNumSegments(segments).realizeMesh(parent->
GetNameBase() + name);
56 return Procedural::CylinderGenerator().setScale(1.0 /
sbs->
UnitScale).setHeight(height).setRadius(radius).setUTile(utile).setVTile(vtile).setNumSegBase(segments_base).setNumSegHeight(segments_height).setCapped(capped).realizeMesh(parent->
GetNameBase() + name);
61 return Procedural::TorusGenerator().setScale(1.0 /
sbs->
UnitScale).setRadius(radius).setSectionRadius(section_radius).setUTile(utile).setVTile(vtile).realizeMesh(parent->
GetNameBase() + name);
66 return Procedural::ConeGenerator().setScale(1.0 /
sbs->
UnitScale).setRadius(radius).setHeight(height).setNumSegBase(segments_base).setNumSegHeight(segments_height).setUTile(utile).setVTile(vtile).realizeMesh(parent->
GetNameBase() + name);
71 return Procedural::TubeGenerator().setScale(1.0 /
sbs->
UnitScale).setHeight(height).setUTile(utile).setVTile(vtile).setNumSegBase(segments_base).setNumSegHeight(segments_height).setInnerRadius(inner_radius).setOuterRadius(outer_radius).realizeMesh(parent->
GetNameBase() + name);
76 return Procedural::BoxGenerator().setScale(1.0 /
sbs->
UnitScale).setSizeX(size_x).setSizeY(size_y).setSizeZ(size_z).setNumSegX(segments_x).setNumSegY(segments_y).setNumSegZ(segments_z).setUTile(utile).setVTile(vtile).realizeMesh(parent->
GetNameBase() + name);
81 return Procedural::CapsuleGenerator().setScale(1.0 /
sbs->
UnitScale).setRadius(radius).setHeight(height).setNumRings(rings).setNumSegHeight(segments_height).setNumSegments(segments).setUTile(utile).setVTile(vtile).realizeMesh(parent->
GetNameBase() + name);
86 return Procedural::TorusKnotGenerator().setScale(1.0 /
sbs->
UnitScale).setRadius(radius).setSectionRadius(section_radius).setUTile(utile).setVTile(vtile).setNumSegCircle(segments_circle).setNumSegSection(seg_section).setP(p).setQ(q).realizeMesh(parent->
GetNameBase() + name);
91 return Procedural::IcoSphereGenerator().setScale(1.0 /
sbs->
UnitScale).setRadius(radius).setNumIterations(iterations).setUTile(utile).setVTile(vtile).realizeMesh(parent->
GetNameBase() + name);
94Ogre::MeshPtr
GeometryController::CreateRoundedBox(
Object* parent,
const std::string& name,
Real size_x,
Real size_y,
Real size_z,
Real chamfer_size,
Real utile,
Real vtile,
unsigned int segments_x,
unsigned int segments_y,
unsigned int segments_z,
bool capped)
96 return Procedural::RoundedBoxGenerator().setScale(1.0 /
sbs->
UnitScale).setSizeX(size_x).setSizeY(size_y).setSizeZ(size_z).setChamferSize(chamfer_size).setNumSegX(segments_x).setNumSegY(segments_y).setNumSegZ(segments_z).setUTile(utile).setVTile(vtile).realizeMesh(parent->
GetNameBase() + name);
99Ogre::MeshPtr
GeometryController::CreateSpring(
Object* parent,
const std::string& name,
Real radius_circle,
Real radius_helix,
Real height,
Real round,
Real utile,
Real vtile,
unsigned int segments_circle,
unsigned int segments_path,
bool capped)
101 return Procedural::SpringGenerator().setScale(1.0 /
sbs->
UnitScale).setHeight(height).setNumRound(round).setRadiusCircle(radius_circle).setRadiusHelix(radius_helix).setNumSegCircle(segments_circle).setNumSegPath(segments_path).setUTile(utile).setVTile(vtile).realizeMesh(parent->
GetNameBase() + name);
106 return Procedural::PrismGenerator().setScale(1.0 /
sbs->
UnitScale).setRadius(radius).setHeight(height).setNumSides(sides).setNumSegHeight(segments_height).setCapped(capped).realizeMesh(parent->
GetNameBase() + name);
Ogre::MeshPtr CreatePrism(Object *parent, const std::string &name, Real radius, Real height, unsigned int sides, unsigned int segments_height, bool capped)
Ogre::MeshPtr CreateCylinder(Object *parent, const std::string &name, Real radius, Real height, Real utile, Real vtile, unsigned int segments_base, unsigned int segments_height, bool capped)
Ogre::MeshPtr CreatePlane(Object *parent, const std::string &name, Real size_x, Real size_y, unsigned int segments_x, unsigned int segments_y, Real utile, Real vtile)
Ogre::MeshPtr CreateRoundedBox(Object *parent, const std::string &name, Real size_x, Real size_y, Real size_z, Real chamfer_size, Real utile, Real vtile, unsigned int segments_x, unsigned int segments_y, unsigned int segments_z, bool capped)
Ogre::MeshPtr CreateSpring(Object *parent, const std::string &name, Real radius_circle, Real radius_helix, Real height, Real round, Real utile, Real vtile, unsigned int segments_circle, unsigned int segments_path, bool capped)
Ogre::MeshPtr CreateTorus(Object *parent, const std::string &name, Real radius, Real section_radius, Real utile, Real vtile)
Ogre::MeshPtr CreateBox(Object *parent, const std::string &name, Real size_x, Real size_y, Real size_z, Real utile, Real vtile, unsigned int segments_x, unsigned int segments_y, unsigned int segments_z)
Ogre::MeshPtr CreateTube(Object *parent, const std::string &name, Real inner_radius, Real outer_radius, Real height, Real utile, Real vtile, unsigned int segments_base, unsigned int segments_height)
Ogre::MeshPtr CreateIcoSphere(Object *parent, const std::string &name, Real radius, Real utile, Real vtile, unsigned int iterations)
Ogre::MeshPtr CreateCapsule(Object *parent, const std::string &name, Real radius, Real height, unsigned int rings, Real utile, Real vtile, unsigned int segments, unsigned int segments_height, bool capped)
GeometryController(Object *parent)
Ogre::MeshPtr CreateCone(Object *parent, const std::string &name, Real radius, Real height, Real utile, Real vtile, unsigned int segments_base, unsigned int segments_height)
Ogre::MeshPtr CreateSphere(Object *parent, const std::string &name, Real radius, Real utile, Real vtile, unsigned int rings, unsigned int segments)
Ogre::MeshPtr CreateTorusKnot(Object *parent, const std::string &name, Real radius, Real section_radius, Real utile, Real vtile, unsigned int segments_circle, unsigned int seg_section, int p, int q)
std::string GetNameBase()
void SetValues(const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true)