Go to the documentation of this file.
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));
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];
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.
static const size_t MS_CORNERS_RIGHT[4]
To call Marching Squares with a cube on its right.
VecDualCell mDualCells
Holds the generated dual cells of the grid.
virtual void addMarchingSquaresTriangles(const Vector3 *corners, const Vector4 *volumeValues, const size_t *indices, const Real maxDistance, MeshBuilder *mb) const =0
Adds triangles to a MeshBuilder via Marching Squares.
static const size_t MS_CORNERS_FRONT[4]
To call Marching Squares with a cube on its front.
size_t getDualCellCount(void) const
Gets the amount of generated dual cells.
static const size_t MS_CORNERS_TOP[4]
To call Marching Squares with a cube on its top.
Vector3 mTotalTo
The total to.
OctreeNode const * mRoot
Starting node to generate the grid from.
bool mSaveDualCells
Whether to store the dualcells for later visualization.
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.
DualCell getDualCell(size_t i) const
Gets a dual cell.
Defines an instance of a discrete, movable object based on a Mesh.
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)
struct _OgreVolumeExport Ogre::Volume::DualCell DualCell
To store the generated dual cells in a vector.
To store the generated dual cells in a vector.
Manages the organisation and rendering of a 'scene' i.e.
Entity * mDualGrid
The entity for the debug visualization of the grid.
virtual void addMarchingCubesTriangles(const Vector3 *corners, const Vector4 *volumeValues, MeshBuilder *mb) const =0
Adds triangles to a MeshBuilder via Marching Cubes.
MeshBuilder * mMb
To store the triangles of the contour.
IsoSurface * mIs
To contour the dualcells.
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.
#define _OgreVolumeExport
const Vector3 & getFrom(void) const
Gets the back lower left corner of the cell.
4-dimensional homogeneous vector.
Real mMaxMSDistance
The maximum distance where to generate the skirts.
static const size_t MS_CORNERS_BACK[4]
To call Marching Squares with a cube on its back.
Class for the generation of the DualGrid.
static const size_t MS_CORNERS_LEFT[4]
To call Marching Squares with a cube on its left.
Vector3 mTotalFrom
The global from.
float Real
Software floating point type.
vector< DualCell >::type VecDualCell
To hold dual cells.
const Vector3 & getTo(void) const
Gets the front upper right corner of the cell.
static size_t mDualGridI
To give the debug manual object an unique name.
static const size_t MS_CORNERS_BOTTOM[4]
To call Marching Squares with a cube on its bottom.
Standard 3-dimensional vector.
A node in the volume octree.
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