Go to the documentation of this file.
28 #ifndef __Ogre_Volume_MeshBuilder_H__
29 #define __Ogre_Volume_MeshBuilder_H__
72 x(v.x), y(v.y), z(v.z),
73 nX(n.x), nY(n.y), nZ(n.z)
162 if (mIndexMap.find(v) == mIndexMap.end())
164 i = mVertices.size();
166 mVertices.push_back(v);
206 mIndices.push_back(i);
260 manual->
index(baseIndex + 0); manual->
index(baseIndex + 1);
261 manual->
index(baseIndex + 1); manual->
index(baseIndex + 2);
262 manual->
index(baseIndex + 2); manual->
index(baseIndex + 3);
263 manual->
index(baseIndex + 3); manual->
index(baseIndex + 0);
265 manual->
index(baseIndex + 4); manual->
index(baseIndex + 5);
266 manual->
index(baseIndex + 5); manual->
index(baseIndex + 6);
267 manual->
index(baseIndex + 6); manual->
index(baseIndex + 7);
268 manual->
index(baseIndex + 7); manual->
index(baseIndex + 4);
270 manual->
index(baseIndex + 0); manual->
index(baseIndex + 4);
271 manual->
index(baseIndex + 1); manual->
index(baseIndex + 5);
272 manual->
index(baseIndex + 2); manual->
index(baseIndex + 6);
273 manual->
index(baseIndex + 3); manual->
index(baseIndex + 7);
297 addVertex(
Vertex(v0, n0));
298 addVertex(
Vertex(v1, n1));
299 addVertex(
Vertex(v2, n2));
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Class to build up a mesh with vertices and indices.
VecIndices mIndices
Holds the indices of the mesh.
Lightweight struct to represent a mesh vertex.
static const unsigned short MAIN_BINDING
The buffer binding.
const Vector3 & getMinimum(void) const
Gets the minimum corner of the box.
vector< Vertex >::type VecVertex
To hold vertices.
map< Vertex, size_t >::type UMapVertexIndex
Map to get a vertex index.
AxisAlignedBox mBox
Holds the bounding box.
Class providing a much simplified interface to generating manual objects with custom geometry.
const Vector3 & getMaximum(void) const
Gets the maximum corner of the box.
Callback class when the user needs information about the triangles of chunks of a LOD level.
Defines an instance of a discrete, movable object based on a Mesh.
UMapVertexIndex mIndexMap
void setMinimumX(Real x)
Changes one of the components of the minimum corner of the box used to resize only one dimension of t...
static void addCubeToManualObject(ManualObject *manual, const Vector3 &c0, const Vector3 &c1, const Vector3 &c2, const Vector3 &c3, const Vector3 &c4, const Vector3 &c5, const Vector3 &c6, const Vector3 &c7, uint32 &baseIndex)
Adds a cube to a manual object rendering lines.
Manages the organisation and rendering of a 'scene' i.e.
Real nZ
Z component of the normal.
A 3D box aligned with the x/y/z axes.
Real y
Y coordinate of the position.
Real x
X coordinate of the position.
bool _OgreVolumeExport operator==(Vertex const &a, Vertex const &b)
== operator for two vertices.
virtual void index(uint32 idx)
Add a vertex index to construct faces / lines / points via indexing rather than just by a simple list...
void addTriangle(const Vector3 &v0, const Vector3 &n0, const Vector3 &v1, const Vector3 &n1, const Vector3 &v2, const Vector3 &n2)
Adds a triangle to the mesh with reusing already existent vertices via their index.
void addVertex(const Vertex &v)
Adds a vertex to the data structure, reusing the index if it is already known.
void setExtents(const Vector3 &min, const Vector3 &max)
Sets both minimum and maximum extents at once.
bool _OgreVolumeExport operator<(const Vector3 &a, const Vector3 &b)
A less operator.
#define _OgreVolumeExport
struct _OgreVolumeExport Ogre::Volume::Vertex Vertex
Lightweight struct to represent a mesh vertex.
VecVertex mVertices
Holds the vertices of the mesh.
Vertex(const Vector3 &v, const Vector3 &n)
Convenience constructor.
virtual ~MeshBuilderCallback()
Real nX
X component of the normal.
void setMaximumX(Real x)
Changes one of the components of the maximum corner of the box used to resize only one dimension of t...
Simple implementation of MovableObject and Renderable for single-part custom objects.
vector< size_t >::type VecIndices
To hold indices.
float Real
Software floating point type.
Real z
Z coordinate of the position.
Real nY
Y component of the normal.
Standard 3-dimensional vector.
'New' rendering operation using vertex buffers.
bool mBoxInit
Holds whether the initial bounding box has been set.
virtual void position(const Vector3 &pos)
Add a vertex position, starting a new vertex at the same time.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15