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

The class deciding on whether to split an octree node or not when building the octree. More...

#include <OgreVolumeOctreeNodeSplitPolicy.h>

+ Collaboration diagram for Ogre::Volume::OctreeNodeSplitPolicy:

Public Member Functions

 OctreeNodeSplitPolicy (const Source *src, const Real maxCellSize)
 Constructur. More...
 
bool doSplit (OctreeNode *node, const Real geometricError) const
 Decider for the splitting. More...
 

Protected Member Functions

Real interpolate (const Real f000, const Real f001, const Real f010, const Real f011, const Real f100, const Real f101, const Real f110, const Real f111, const Vector3 &position) const
 Trilinear interpolation of a relative point. More...
 

Protected Attributes

Real mMaxCellSize
 The maximum cell size where the policy stops the splitting. More...
 
const SourcemSrc
 Holds the volume source to decide something. More...
 

Detailed Description

The class deciding on whether to split an octree node or not when building the octree.

Splitting like Zhang in http://www.andrew.cmu.edu/user/jessicaz/publication/meshing/.

Definition at line 45 of file OgreVolumeOctreeNodeSplitPolicy.h.

Constructor & Destructor Documentation

Ogre::Volume::OctreeNodeSplitPolicy::OctreeNodeSplitPolicy ( const Source src,
const Real  maxCellSize 
)

Constructur.

Protected to have the initialization.

Parameters
srcThe volume source to decide something.
maxCellSizeThe maximum size when the splitting will stop anyway.

Member Function Documentation

bool Ogre::Volume::OctreeNodeSplitPolicy::doSplit ( OctreeNode node,
const Real  geometricError 
) const

Decider for the splitting.

Parameters
nodeThe split candidate.
geometricErrorThe accepted geometric error.
Returns
true if the node should be split.
Real Ogre::Volume::OctreeNodeSplitPolicy::interpolate ( const Real  f000,
const Real  f001,
const Real  f010,
const Real  f011,
const Real  f100,
const Real  f101,
const Real  f110,
const Real  f111,
const Vector3 position 
) const
inlineprotected

Trilinear interpolation of a relative point.

Parameters
f000Value of the lower back left corner.
f001Value of the lower front right corner.
f010Value of the upper back left corner.
f011Value of the upper front left corner.
f100Value of the lower back right corner.
f101Value of the lower back right corner.
f110Value of the upper front right corner.
f111Value of the upper front right corner.
positionThe relative (0-1) position to interpolate.
Returns
The interpolated value.

Definition at line 77 of file OgreVolumeOctreeNodeSplitPolicy.h.

References Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

Member Data Documentation

Real Ogre::Volume::OctreeNodeSplitPolicy::mMaxCellSize
protected

The maximum cell size where the policy stops the splitting.

Definition at line 53 of file OgreVolumeOctreeNodeSplitPolicy.h.

const Source* Ogre::Volume::OctreeNodeSplitPolicy::mSrc
protected

Holds the volume source to decide something.

Definition at line 50 of file OgreVolumeOctreeNodeSplitPolicy.h.


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