28 #ifndef __Ogre_Volume_DualGridGenerator_H__
29 #define __Ogre_Volume_DualGridGenerator_H__
56 mC0(c0), mC1(c1), mC2(c2), mC3(c3), mC4(c4), mC5(c5), mC6(c6), mC7(c7)
119 addDualCell(c0, c1, c2, c3, c4, c5, c6, c7, 0);
148 mDualCells.push_back(
DualCell(c0, c1, c2, c3, c4, c5, c6, c7));
160 mIs->addMarchingCubesTriangles(corners, values, mMb);
161 Vector3 from = mRoot->getFrom();
163 if (corners[0].z == from.
z && corners[0].
z != mTotalFrom.z)
167 if (corners[2].z == to.
z && corners[2].
z != mTotalTo.z)
171 if (corners[0].x == from.
x && corners[0].
x != mTotalFrom.x)
175 if (corners[1].x == to.
x && corners[1].
x != mTotalTo.x)
179 if (corners[5].y == to.
y && corners[5].
y != mTotalTo.y)
183 if (corners[0].y == from.
y && corners[0].
y != mTotalFrom.y)
336 return mDualCells.size();
347 return mDualCells[i];
OctreeNode const * mRoot
Starting node to generate the grid from.
float Real
Software floating point type.
struct _OgreVolumeExport Ogre::Volume::DualCell DualCell
To store the generated dual cells in a vector.
To store the generated dual cells in a vector.
vector< DualCell >::type VecDualCell
To hold dual cells.
Manages the organisation and rendering of a 'scene' i.e.
Vector3 mTotalFrom
The global from.
DualCell(const Vector3 &c0, const Vector3 &c1, const Vector3 &c2, const Vector3 &c3, const Vector3 &c4, const Vector3 &c5, const Vector3 &c6, const Vector3 &c7)
Vector3 mTotalTo
The total to.
static const size_t MS_CORNERS_TOP[4]
To call Marching Squares with a cube on its top.
size_t getDualCellCount(void) const
Gets the amount of generated dual cells.
void addDualCell(const Vector3 &c0, const Vector3 &c1, const Vector3 &c2, const Vector3 &c3, const Vector3 &c4, const Vector3 &c5, const Vector3 &c6, const Vector3 &c7)
Adds a dualcell.
VecDualCell mDualCells
Holds the generated dual cells of the grid.
static const size_t MS_CORNERS_FRONT[4]
To call Marching Squares with a cube on its front.
Defines an instance of a discrete, movable object based on a Mesh.
Real mMaxMSDistance
The maximum distance where to generate the skirts.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
MeshBuilder * mMb
To store the triangles of the contour.
static const size_t MS_CORNERS_BACK[4]
To call Marching Squares with a cube on its back.
void addDualCell(const Vector3 &c0, const Vector3 &c1, const Vector3 &c2, const Vector3 &c3, const Vector3 &c4, const Vector3 &c5, const Vector3 &c6, const Vector3 &c7, Vector4 *values)
Adds a dualcell with precalculated values.
Standard 3-dimensional vector.
bool mSaveDualCells
Whether to store the dualcells for later visualization.
Entity * mDualGrid
The entity for the debug visualization of the grid.
IsoSurface * mIs
To contour the dualcells.
A node in the volume octree.
#define _OgreVolumeExport
4-dimensional homogeneous vector.
DualCell getDualCell(size_t i) const
Gets a dual cell.
static size_t mDualGridI
To give the debug manual object an unique name.
static const size_t MS_CORNERS_LEFT[4]
To call Marching Squares with a cube on its left.
Class to build up a mesh with vertices and indices.
static const size_t MS_CORNERS_RIGHT[4]
To call Marching Squares with a cube on its right.
Class for the generation of the DualGrid.
static const size_t MS_CORNERS_BOTTOM[4]
To call Marching Squares with a cube on its bottom.