osg::ParticleBSPNode Class Reference

Particle BSP Tree Node. More...

#include <OSGParticleBSP.h>

List of all members.

Public Types

enum  { X = 0, Y, Z, Leaf }

Public Member Functions

Constructors


 ParticleBSPNode (void)
 ParticleBSPNode (const ParticleBSPNode &source)
 ParticleBSPNode (UInt32 value)
 ParticleBSPNode (UInt8 axis, Real32 splitvalue)
Destructors


 ~ParticleBSPNode (void)
Access


bool isLeaf (void) const
Int32 getValue (void) const
Real32 getSplitValue (void) const
UInt8 getAxis (void) const
void setValue (Int32 value)
void setSplit (UInt8 axis, Real32 splitvalue)
Output


void dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const

Public Attributes

enum osg::ParticleBSPNode:: { ... }  Axis
Int32 _value
Real32 _splitvalue

Private Attributes

UInt8 _axis
union {
   Int32   _value
   Real32   _splitvalue
}; 


Detailed Description

A node of the ParticleBSPTree.

Definition at line 66 of file OSGParticleBSP.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
X 
Y 
Z 
Leaf 

Definition at line 71 of file OSGParticleBSP.h.

00071 { X=0, Y, Z, Leaf } Axis;


Constructor & Destructor Documentation

ParticleBSPNode::ParticleBSPNode ( void   ) 

Definition at line 74 of file OSGParticleBSP.cpp.

00074                                      :
00075     _axis()
00076 {
00077 }
    

ParticleBSPNode::ParticleBSPNode ( const ParticleBSPNode source  ) 

Definition at line 79 of file OSGParticleBSP.cpp.

References _splitvalue, _value, and isLeaf().

00079                                                               :
00080     _axis(source._axis)
00081 {
00082     if(isLeaf())
00083     {
00084         _value = source._value;
00085     }
00086     else
00087     {
00088         _splitvalue = source._splitvalue;        
00089     }
00090 }

ParticleBSPNode::ParticleBSPNode ( UInt32  value  ) 

Definition at line 92 of file OSGParticleBSP.cpp.

00092                                              :
00093     _axis(Leaf),
00094     _value(value)
00095 {
00096 }

ParticleBSPNode::ParticleBSPNode ( UInt8  axis,
Real32  splitvalue 
)

Definition at line 98 of file OSGParticleBSP.cpp.

00098                                                               :
00099     _axis(axis),
00100     _splitvalue(splitvalue)
00101 {
00102 }

ParticleBSPNode::~ParticleBSPNode ( void   ) 

Definition at line 104 of file OSGParticleBSP.cpp.

00105 {
00106 }


Member Function Documentation

bool osg::ParticleBSPNode::isLeaf ( void   )  const [inline]

Definition at line 49 of file OSGParticleBSP.inl.

References _axis, and Leaf.

Referenced by osg::ParticleBSPTree::doTraverse(), dump(), and ParticleBSPNode().

00050 {
00051     return _axis == Leaf;
00052 }

Int32 osg::ParticleBSPNode::getValue ( void   )  const [inline]

Definition at line 55 of file OSGParticleBSP.inl.

References _value.

Referenced by osg::ParticleBSPTree::doTraverse().

00056 {
00057     return _value;
00058 }

Real32 osg::ParticleBSPNode::getSplitValue ( void   )  const [inline]

Definition at line 61 of file OSGParticleBSP.inl.

References _splitvalue.

Referenced by osg::ParticleBSPTree::doTraverse().

00062 {
00063     return _splitvalue;
00064 }

UInt8 osg::ParticleBSPNode::getAxis ( void   )  const [inline]

Definition at line 67 of file OSGParticleBSP.inl.

References _axis.

Referenced by osg::ParticleBSPTree::doTraverse().

00068 {
00069     return _axis;
00070 }

void osg::ParticleBSPNode::setValue ( Int32  value  )  [inline]

Definition at line 73 of file OSGParticleBSP.inl.

References _axis, _value, and Leaf.

00074 {
00075     _value = value;
00076     _axis = Leaf;
00077 }

void osg::ParticleBSPNode::setSplit ( UInt8  axis,
Real32  splitvalue 
) [inline]

Definition at line 80 of file OSGParticleBSP.inl.

References _axis, and _splitvalue.

00081 {
00082     _splitvalue = splitvalue;
00083     _axis       = axis;
00084 }

void ParticleBSPNode::dump ( UInt32  uiIndent = 0,
const BitVector  bvFlags = 0 
) const

Definition at line 110 of file OSGParticleBSP.cpp.

References _axis, _splitvalue, _value, isLeaf(), and PLOG.

00112 {
00113     static const char *axisname = "XYZL";
00114     
00115     Real32 v = isLeaf()?_value:_splitvalue;
00116     
00117     PLOG << "(" << axisname[_axis] << " " << v << ")";
00118 }


Member Data Documentation

Definition at line 118 of file OSGParticleBSP.h.

Referenced by dump(), getAxis(), isLeaf(), setSplit(), and setValue().

Definition at line 122 of file OSGParticleBSP.h.

Referenced by dump(), getValue(), ParticleBSPNode(), and setValue().

Definition at line 123 of file OSGParticleBSP.h.

Referenced by dump(), getSplitValue(), ParticleBSPNode(), and setSplit().

union { ... } [private]


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

Generated on Mon Mar 17 12:07:26 2008 for OpenSG by  doxygen 1.5.5