Ogre Procedural
0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
|
#include <ProceduralRoundedBoxGenerator.h>
Public Member Functions | |
RoundedBoxGenerator () | |
RoundedBoxGenerator & | setSizeX (Ogre::Real sizeX) |
Sets the size of the box along X axis. More... | |
RoundedBoxGenerator & | setSizeY (Ogre::Real sizeY) |
Sets the size of the box along Y axis. More... | |
RoundedBoxGenerator & | setSizeZ (Ogre::Real sizeZ) |
Sets the size of the box along Z axis. More... | |
RoundedBoxGenerator & | setSize (Ogre::Vector3 size) |
Sets the size (default=1,1,1) More... | |
RoundedBoxGenerator & | setNumSegX (unsigned short numSegX) |
Sets the number of segments along X axis (default=1) More... | |
RoundedBoxGenerator & | setNumSegY (unsigned short numSegY) |
Sets the number of segments along Y axis (default=1) More... | |
RoundedBoxGenerator & | setNumSegZ (unsigned short numSegZ) |
Sets the number of segments along Z axis (default=1) More... | |
RoundedBoxGenerator & | setChamferSize (Ogre::Real chamferSize) |
Sets the size of the chamfer, ie the radius of the rounded part. More... | |
void | addToTriangleBuffer (TriangleBuffer &buffer) const |
Builds the mesh into the given TriangleBuffer. More... | |
Ogre::MeshPtr | realizeMesh (const std::string &name="", const Ogre::String &group="General") |
Builds a mesh. More... | |
TriangleBuffer | buildTriangleBuffer () const |
Outputs a triangleBuffer. More... | |
RoundedBoxGenerator & | setUTile (Ogre::Real uTile) |
Sets U Tile, ie the number by which u texture coordinates are multiplied (default=1) More... | |
RoundedBoxGenerator & | setVTile (Ogre::Real vTile) |
Sets V Tile, ie the number by which v texture coordinates are multiplied (default=1) More... | |
RoundedBoxGenerator & | setTextureRectangle (const Ogre::RealRect &textureRectangle) |
Sets the texture rectangle. More... | |
RoundedBoxGenerator & | setEnableNormals (bool enableNormals) |
Sets whether normals are enabled or not (default=true) More... | |
RoundedBoxGenerator & | setNumTexCoordSet (unsigned char numTexCoordSet) |
Sets the number of texture coordintate sets (default=1) More... | |
RoundedBoxGenerator & | setSwitchUV (bool switchUV) |
Sets whether to switch U and V texture coordinates. More... | |
RoundedBoxGenerator & | setOrientation (const Ogre::Quaternion &orientation) |
Sets an orientation to give when building the mesh. More... | |
RoundedBoxGenerator & | setPosition (const Ogre::Vector3 &position) |
Sets a translation baked into the resulting mesh. More... | |
RoundedBoxGenerator & | setPosition (Ogre::Real x, Ogre::Real y, Ogre::Real z) |
Sets a translation baked into the resulting mesh. More... | |
RoundedBoxGenerator & | setScale (const Ogre::Vector3 &scale) |
Sets a scale baked into the resulting mesh. More... | |
RoundedBoxGenerator & | setScale (Ogre::Real scale) |
Sets a uniform scale baked into the resulting mesh. More... | |
RoundedBoxGenerator & | setScale (Ogre::Real x, Ogre::Real y, Ogre::Real z) |
Sets a scale baked into the resulting mesh. More... | |
RoundedBoxGenerator & | resetTransforms () |
Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More... | |
Protected Member Functions | |
void | addPoint (TriangleBuffer &buffer, const Ogre::Vector3 &position, const Ogre::Vector3 &normal, const Ogre::Vector2 &uv) const |
Adds a new point to a triangle buffer, using the format defined for that MeshGenerator. More... | |
Protected Attributes | |
Ogre::Real | mUTile |
A pointer to the default scene manager. More... | |
Ogre::Real | mVTile |
V tile for texture coords generation. More... | |
bool | mEnableNormals |
Whether to produces normals or not. More... | |
unsigned char | mNumTexCoordSet |
The number of texture coordinate sets to include. More... | |
Ogre::Vector2 | mUVOrigin |
Rectangle in which the texture coordinates will be placed. More... | |
bool | mSwitchUV |
If set to true, the UV coordinates coming from the mesh generator will be switched. More... | |
Ogre::Quaternion | mOrientation |
Orientation to apply the mesh. More... | |
Ogre::Vector3 | mScale |
Scale to apply the mesh. More... | |
Ogre::Vector3 | mPosition |
Position to apply to the mesh. More... | |
bool | mTransform |
Builds a rounded box. You can choose the size of the rounded borders to get a sharper or smoother look.
Procedural::RoundedBoxGenerator::RoundedBoxGenerator | ( | ) |
|
protectedinherited |
Adds a new point to a triangle buffer, using the format defined for that MeshGenerator.
buffer | the triangle buffer to update |
position | the position of the new point |
normal | the normal of the new point |
uv | the uv texcoord of the new point |
|
virtual |
Builds the mesh into the given TriangleBuffer.
buffer | The TriangleBuffer on where to append the mesh. |
Implements Procedural::MeshGenerator< RoundedBoxGenerator >.
|
inherited |
Outputs a triangleBuffer.
|
inherited |
Builds a mesh.
name | of the mesh for the MeshManager |
group | ressource group in which the mesh will be created |
|
inherited |
Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values.
RoundedBoxGenerator& Procedural::RoundedBoxGenerator::setChamferSize | ( | Ogre::Real | chamferSize | ) |
Sets the size of the chamfer, ie the radius of the rounded part.
Ogre::InvalidParametersException | chamferSize must be larger than 0! |
References Ogre::Exception::ERR_INVALIDPARAMS, and OGRE_EXCEPT.
|
inherited |
Sets whether normals are enabled or not (default=true)
RoundedBoxGenerator& Procedural::RoundedBoxGenerator::setNumSegX | ( | unsigned short | numSegX | ) |
Sets the number of segments along X axis (default=1)
Ogre::InvalidParametersException | Minimum of numSegX is 1 |
References Ogre::Exception::ERR_INVALIDPARAMS, and OGRE_EXCEPT.
RoundedBoxGenerator& Procedural::RoundedBoxGenerator::setNumSegY | ( | unsigned short | numSegY | ) |
Sets the number of segments along Y axis (default=1)
Ogre::InvalidParametersException | Minimum of numSegY is 1 |
References Ogre::Exception::ERR_INVALIDPARAMS, and OGRE_EXCEPT.
RoundedBoxGenerator& Procedural::RoundedBoxGenerator::setNumSegZ | ( | unsigned short | numSegZ | ) |
Sets the number of segments along Z axis (default=1)
Ogre::InvalidParametersException | Minimum of numSegZ is 1 |
References Ogre::Exception::ERR_INVALIDPARAMS, and OGRE_EXCEPT.
|
inherited |
Sets the number of texture coordintate sets (default=1)
|
inherited |
Sets an orientation to give when building the mesh.
|
inherited |
Sets a translation baked into the resulting mesh.
|
inherited |
Sets a translation baked into the resulting mesh.
|
inherited |
Sets a scale baked into the resulting mesh.
|
inherited |
Sets a uniform scale baked into the resulting mesh.
|
inherited |
Sets a scale baked into the resulting mesh.
RoundedBoxGenerator& Procedural::RoundedBoxGenerator::setSize | ( | Ogre::Vector3 | size | ) |
Sets the size (default=1,1,1)
RoundedBoxGenerator& Procedural::RoundedBoxGenerator::setSizeX | ( | Ogre::Real | sizeX | ) |
Sets the size of the box along X axis.
Ogre::InvalidParametersException | X size must be larger than 0! |
References Ogre::Exception::ERR_INVALIDPARAMS, and OGRE_EXCEPT.
RoundedBoxGenerator& Procedural::RoundedBoxGenerator::setSizeY | ( | Ogre::Real | sizeY | ) |
Sets the size of the box along Y axis.
Ogre::InvalidParametersException | Y size must be larger than 0! |
References Ogre::Exception::ERR_INVALIDPARAMS, and OGRE_EXCEPT.
RoundedBoxGenerator& Procedural::RoundedBoxGenerator::setSizeZ | ( | Ogre::Real | sizeZ | ) |
Sets the size of the box along Z axis.
Ogre::InvalidParametersException | Z size must be larger than 0! |
References Ogre::Exception::ERR_INVALIDPARAMS, and OGRE_EXCEPT.
|
inherited |
Sets whether to switch U and V texture coordinates.
|
inherited |
Sets the texture rectangle.
|
inherited |
Sets U Tile, ie the number by which u texture coordinates are multiplied (default=1)
|
inherited |
Sets V Tile, ie the number by which v texture coordinates are multiplied (default=1)
|
protectedinherited |
Whether to produces normals or not.
|
protectedinherited |
The number of texture coordinate sets to include.
|
protectedinherited |
Orientation to apply the mesh.
|
protectedinherited |
Position to apply to the mesh.
|
protectedinherited |
Scale to apply the mesh.
|
protectedinherited |
If set to true, the UV coordinates coming from the mesh generator will be switched.
It can be used, for example, if your texture doesn't fit the mesh generator's assumptions about UV. If UV were to fit in a given rectangle, they still fit in it after the switch.
|
protectedinherited |
|
protectedinherited |
A pointer to the default scene manager.
U tile for texture coords generation
|
protectedinherited |
Rectangle in which the texture coordinates will be placed.
|
protectedinherited |
V tile for texture coords generation.