OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::Volume::DualGridGenerator Class Reference

Class for the generation of the DualGrid. More...

#include <OgreVolumeDualGridGenerator.h>

+ Inheritance diagram for Ogre::Volume::DualGridGenerator:
+ Collaboration diagram for Ogre::Volume::DualGridGenerator:

Public Member Functions

 DualGridGenerator (void)
 Constructor. More...
 
void generateDualGrid (const OctreeNode *root, IsoSurface *is, MeshBuilder *mb, Real maxMSDistance, const Vector3 &totalFrom, const Vector3 &totalTo, bool saveDualCells)
 Generates the dualgrid of the given octree root node. More...
 
DualCell getDualCell (size_t i) const
 Gets a dual cell. More...
 
size_t getDualCellCount (void) const
 Gets the amount of generated dual cells. More...
 
EntitygetDualGrid (SceneManager *sceneManager)
 Gets the lazily created entity of the dualgrid debug visualization. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 

Protected Member Functions

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. More...
 
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. More...
 
void createBorderCells (const OctreeNode *n0, const OctreeNode *n1, const OctreeNode *n2, const OctreeNode *n3, const OctreeNode *n4, const OctreeNode *n5, const OctreeNode *n6, const OctreeNode *n7)
 
void edgeProcX (const OctreeNode *n0, const OctreeNode *n1, const OctreeNode *n2, const OctreeNode *n3)
 edgeProc with variing X of the nodes, see the paper for edgeProc(). More...
 
void edgeProcY (const OctreeNode *n0, const OctreeNode *n1, const OctreeNode *n2, const OctreeNode *n3)
 edgeProc with variing Y of the nodes, see the paper for edgeProc(). More...
 
void edgeProcZ (const OctreeNode *n0, const OctreeNode *n1, const OctreeNode *n2, const OctreeNode *n3)
 edgeProc with variing Z of the nodes, see the paper for edgeProc(). More...
 
void faceProcXY (const OctreeNode *n0, const OctreeNode *n1)
 
void faceProcXZ (const OctreeNode *n0, const OctreeNode *n1)
 
void faceProcZY (const OctreeNode *n0, const OctreeNode *n1)
 
void nodeProc (const OctreeNode *n)
 
void vertProc (const OctreeNode *n0, const OctreeNode *n1, const OctreeNode *n2, const OctreeNode *n3, const OctreeNode *n4, const OctreeNode *n5, const OctreeNode *n6, const OctreeNode *n7)
 

Protected Attributes

VecDualCell mDualCells
 Holds the generated dual cells of the grid. More...
 
EntitymDualGrid
 The entity for the debug visualization of the grid. More...
 
IsoSurfacemIs
 To contour the dualcells. More...
 
Real mMaxMSDistance
 The maximum distance where to generate the skirts. More...
 
MeshBuildermMb
 To store the triangles of the contour. More...
 
OctreeNode const * mRoot
 Starting node to generate the grid from. More...
 
bool mSaveDualCells
 Whether to store the dualcells for later visualization. More...
 
Vector3 mTotalFrom
 The global from. More...
 
Vector3 mTotalTo
 The total to. More...
 

Static Protected Attributes

static size_t mDualGridI
 To give the debug manual object an unique name. More...
 

Detailed Description

Class for the generation of the DualGrid.

Definition at line 67 of file OgreVolumeDualGridGenerator.h.

Constructor & Destructor Documentation

Ogre::Volume::DualGridGenerator::DualGridGenerator ( void  )

Constructor.

Member Function Documentation

void Ogre::Volume::DualGridGenerator::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 
)
inlineprotected

Adds a dualcell.

Parameters
c0The first corner.
c1The second corner.
c2The third corner.
c3The fourth corner.
c4The fifth corner.
c5The sixth corner.
c6The seventh corner.

Definition at line 117 of file OgreVolumeDualGridGenerator.h.

void Ogre::Volume::DualGridGenerator::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 
)
inlineprotected

Adds a dualcell with precalculated values.

Parameters
c0The first corner.
c1The second corner.
c2The third corner.
c3The fourth corner.
c4The fifth corner.
c5The sixth corner.
c6The seventh corner.
c7The eighth corner.
valuesThe (possible) values at the corners.

Definition at line 142 of file OgreVolumeDualGridGenerator.h.

References Ogre::Volume::IsoSurface::MS_CORNERS_BACK, Ogre::Volume::IsoSurface::MS_CORNERS_BOTTOM, Ogre::Volume::IsoSurface::MS_CORNERS_FRONT, Ogre::Volume::IsoSurface::MS_CORNERS_LEFT, Ogre::Volume::IsoSurface::MS_CORNERS_RIGHT, Ogre::Volume::IsoSurface::MS_CORNERS_TOP, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

void Ogre::Volume::DualGridGenerator::createBorderCells ( const OctreeNode n0,
const OctreeNode n1,
const OctreeNode n2,
const OctreeNode n3,
const OctreeNode n4,
const OctreeNode n5,
const OctreeNode n6,
const OctreeNode n7 
)
protected
void Ogre::Volume::DualGridGenerator::edgeProcX ( const OctreeNode n0,
const OctreeNode n1,
const OctreeNode n2,
const OctreeNode n3 
)
protected

edgeProc with variing X of the nodes, see the paper for edgeProc().

Direction of parameters: Z+, Y around the clock (n0, n3, n7, n4 for example of the parent cell)

Parameters
n0The first node.
n1The second node.
n2The third node.
n3The fourth node.
void Ogre::Volume::DualGridGenerator::edgeProcY ( const OctreeNode n0,
const OctreeNode n1,
const OctreeNode n2,
const OctreeNode n3 
)
protected

edgeProc with variing Y of the nodes, see the paper for edgeProc().

Direction of parameters: X+, Z around the clock (n0, n1, n2, n3 for example of the parent cell)

Parameters
n0The first node.
n1The second node.
n2The third node.
n3The fourth node.
void Ogre::Volume::DualGridGenerator::edgeProcZ ( const OctreeNode n0,
const OctreeNode n1,
const OctreeNode n2,
const OctreeNode n3 
)
protected

edgeProc with variing Z of the nodes, see the paper for edgeProc().

Direction of parameters: X+, Y around the clock (n7, n6, n2, n3 for example of the parent cell)

Parameters
n0The first node.
n1The second node.
n2The third node.
n3The fourth node.
void Ogre::Volume::DualGridGenerator::faceProcXY ( const OctreeNode n0,
const OctreeNode n1 
)
protected
void Ogre::Volume::DualGridGenerator::faceProcXZ ( const OctreeNode n0,
const OctreeNode n1 
)
protected
void Ogre::Volume::DualGridGenerator::faceProcZY ( const OctreeNode n0,
const OctreeNode n1 
)
protected
void Ogre::Volume::DualGridGenerator::generateDualGrid ( const OctreeNode root,
IsoSurface is,
MeshBuilder mb,
Real  maxMSDistance,
const Vector3 totalFrom,
const Vector3 totalTo,
bool  saveDualCells 
)

Generates the dualgrid of the given octree root node.

Parameters
rootThe octree root node.
isTo contour the dualcells.
mbTo store the triangles of the contour.
maxMSDistanceThe maximum distance to the isosurface where to generate skirts.
totalFromThe global from.
totalToThe global to.
saveDualCellsWhether to save the generated dualcells of the generated dual cells.
DualCell Ogre::Volume::DualGridGenerator::getDualCell ( size_t  i) const
inline

Gets a dual cell.

Parameters
iThe index of the wanted dual cell.
Returns
The dual cell.

Definition at line 345 of file OgreVolumeDualGridGenerator.h.

size_t Ogre::Volume::DualGridGenerator::getDualCellCount ( void  ) const
inline

Gets the amount of generated dual cells.

Returns
The amount of generated dual cells.

Definition at line 334 of file OgreVolumeDualGridGenerator.h.

Entity* Ogre::Volume::DualGridGenerator::getDualGrid ( SceneManager sceneManager)

Gets the lazily created entity of the dualgrid debug visualization.

Parameters
sceneManagerThe scenemanager creating the entity.
Returns
The entity. Might be null if no dualcells are available.
void Ogre::Volume::DualGridGenerator::nodeProc ( const OctreeNode n)
protected
template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

void Ogre::Volume::DualGridGenerator::vertProc ( const OctreeNode n0,
const OctreeNode n1,
const OctreeNode n2,
const OctreeNode n3,
const OctreeNode n4,
const OctreeNode n5,
const OctreeNode n6,
const OctreeNode n7 
)
protected

Member Data Documentation

VecDualCell Ogre::Volume::DualGridGenerator::mDualCells
protected

Holds the generated dual cells of the grid.

Definition at line 81 of file OgreVolumeDualGridGenerator.h.

Entity* Ogre::Volume::DualGridGenerator::mDualGrid
protected

The entity for the debug visualization of the grid.

Definition at line 75 of file OgreVolumeDualGridGenerator.h.

size_t Ogre::Volume::DualGridGenerator::mDualGridI
staticprotected

To give the debug manual object an unique name.

Definition at line 72 of file OgreVolumeDualGridGenerator.h.

IsoSurface* Ogre::Volume::DualGridGenerator::mIs
protected

To contour the dualcells.

Definition at line 87 of file OgreVolumeDualGridGenerator.h.

Real Ogre::Volume::DualGridGenerator::mMaxMSDistance
protected

The maximum distance where to generate the skirts.

Definition at line 93 of file OgreVolumeDualGridGenerator.h.

MeshBuilder* Ogre::Volume::DualGridGenerator::mMb
protected

To store the triangles of the contour.

Definition at line 90 of file OgreVolumeDualGridGenerator.h.

OctreeNode const* Ogre::Volume::DualGridGenerator::mRoot
protected

Starting node to generate the grid from.

Definition at line 78 of file OgreVolumeDualGridGenerator.h.

bool Ogre::Volume::DualGridGenerator::mSaveDualCells
protected

Whether to store the dualcells for later visualization.

Definition at line 84 of file OgreVolumeDualGridGenerator.h.

Vector3 Ogre::Volume::DualGridGenerator::mTotalFrom
protected

The global from.

Definition at line 96 of file OgreVolumeDualGridGenerator.h.

Vector3 Ogre::Volume::DualGridGenerator::mTotalTo
protected

The total to.

Definition at line 99 of file OgreVolumeDualGridGenerator.h.


The documentation for this class was generated from the following file: