Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osg::DrawTreeNode Class Reference
[Rendering BackendRendering Backend]

#include <OSGDrawTreeNode.h>

Inheritance diagram for osg::DrawTreeNode:

osg::MemoryObject List of all members.

Public Member Functions

Access
*DrawTreeNodegetFirstChild (void)
DrawTreeNodegetLastChild (void)
void addChild (DrawTreeNode *pChild)
void insertFirstChild (DrawTreeNode *pChild)
void insertChildAfter (DrawTreeNode *pCurrent, DrawTreeNode *pChild)
DrawTreeNodegetBrother (void)
void setBrother (DrawTreeNode *pBrother)
void setGeometry (Geometry *pGeo)
GeometrygetGeometry (void)
void setFunctor (Material::DrawFunctor &func)
Material::DrawFunctorgetFunctor (void)
bool hasFunctor (void)
void setState (State *pState)
StategetState (void)
void setNode (NodePtr pNode)
NodePtr getNode (void)
void setMatrixStore (const RenderAction::MatrixStore &oMatrixStore)
RenderAction::MatrixStoregetMatrixStore (void)
void setScalar (Real32 rScalar)
Real32 getScalar (void)
void setLightsState (UInt64 state)
UInt64 getLightsState (void)
void setMultiPass (void)
void setLastMultiPass (void)
bool isMultiPass (void)
bool isLastMultiPass (void)
void setNoStateSorting (void)
bool isNoStateSorting (void)
void reset (void)
Reference Counting
*void addRef (void)
void subRef (void)
Int32 getRefCount (void)

Static Public Attributes

Statistic
*static Int32 _iCreateCount = 0
static Int32 _iDeleteCount = 0
Flags
*static const UInt8 MultiPass = 1
static const UInt8 LastMultiPass = 2
static const UInt8 NoStateSorting = 4

Protected Types

typedef MemoryObject Inherited

Protected Member Functions

Constructors
DrawTreeNode (void)
Destructor
*virtual ~DrawTreeNode (void)

Protected Attributes

Member
*DrawTreeNode_pFirstChild
DrawTreeNode_pLastChild
DrawTreeNode_pBrother
NodePtr _pNode
State_pState
Geometry_pGeo
Material::DrawFunctor _functor
bool _hasFunctor
RenderAction::MatrixStore _oMatrixStore
Real32 _rScalarVal
UInt64 _lightsState
Int8 _flags

Private Member Functions

 DrawTreeNode (const DrawTreeNode &source)
 prohibit default function (move to 'public' if needed)
void operator= (const DrawTreeNode &source)
 prohibit default function (move to 'public' if needed)

Friends

class DrawTreeNodeFactory

Detailed Description

Definition at line 61 of file OSGDrawTreeNode.h.


Member Typedef Documentation

typedef MemoryObject osg::DrawTreeNode::Inherited [protected]
 

Definition at line 134 of file OSGDrawTreeNode.h.


Constructor & Destructor Documentation

DrawTreeNode::DrawTreeNode void   )  [protected]
 

Definition at line 73 of file OSGDrawTreeNode.cpp.

References _oMatrixStore, and osg::RenderAction::MatrixStore::first.

00073                                :
00074      Inherited   (),
00075     _pFirstChild (NULL),
00076     _pLastChild  (NULL),
00077     _pBrother    (NULL),
00078     _pState      (NULL),
00079     _pGeo        (NULL),
00080     _functor     (),
00081     _hasFunctor  (false),
00082     _oMatrixStore(),
00083     _rScalarVal  (0.f),
00084     _lightsState (0),
00085     _flags       (0)
00086 {
00087     _oMatrixStore.first = 0;
00088 }

DrawTreeNode::~DrawTreeNode void   )  [protected, virtual]
 

Definition at line 93 of file OSGDrawTreeNode.cpp.

00094 {
00095 }

osg::DrawTreeNode::DrawTreeNode const DrawTreeNode source  )  [private]
 


Member Function Documentation

DrawTreeNode * osg::DrawTreeNode::getFirstChild void   )  [inline]
 

Definition at line 46 of file OSGDrawTreeNode.inl.

References _pFirstChild.

Referenced by osg::RenderAction::draw(), and osg::RenderAction::dump().

00047 {
00048     return _pFirstChild;
00049 }

DrawTreeNode * osg::DrawTreeNode::getLastChild void   )  [inline]
 

Definition at line 52 of file OSGDrawTreeNode.inl.

References _pLastChild.

00053 {
00054     return _pLastChild;
00055 }

void osg::DrawTreeNode::addChild DrawTreeNode pChild  )  [inline]
 

Definition at line 58 of file OSGDrawTreeNode.inl.

References _pFirstChild, _pLastChild, and setBrother().

Referenced by osg::RenderAction::dropFunctor(), osg::RenderAction::dropGeometry(), and insertFirstChild().

00059 {
00060     if(_pLastChild == NULL)
00061     {
00062         _pFirstChild = pChild;
00063         _pLastChild  = pChild;
00064     }
00065     else
00066     {
00067         _pLastChild->setBrother(pChild);
00068         _pLastChild = pChild;
00069     }
00070 }

void osg::DrawTreeNode::insertFirstChild DrawTreeNode pChild  )  [inline]
 

Definition at line 73 of file OSGDrawTreeNode.inl.

References _pFirstChild, addChild(), and setBrother().

00074 {
00075     if(pChild == NULL)
00076         return;
00077 
00078     if(_pFirstChild == NULL)
00079     {
00080         addChild(pChild);
00081     }
00082     else
00083     {
00084         pChild->setBrother(_pFirstChild);
00085         _pFirstChild = pChild;
00086     }
00087     
00088 }

void osg::DrawTreeNode::insertChildAfter DrawTreeNode pCurrent,
DrawTreeNode pChild
[inline]
 

Definition at line 91 of file OSGDrawTreeNode.inl.

References _pLastChild, getBrother(), and setBrother().

00093 {
00094     if(pCurrent == NULL || pChild == NULL)
00095         return;
00096 
00097     pChild  ->setBrother(pCurrent->getBrother());
00098     pCurrent->setBrother(pChild  );
00099 
00100     if(pCurrent == _pLastChild)
00101     {
00102         _pLastChild = pChild;
00103     }    
00104 }

DrawTreeNode * osg::DrawTreeNode::getBrother void   )  [inline]
 

Definition at line 107 of file OSGDrawTreeNode.inl.

References _pBrother.

Referenced by osg::RenderAction::draw(), osg::RenderAction::dropFunctor(), osg::RenderAction::dropGeometry(), osg::RenderAction::dump(), and insertChildAfter().

00108 {
00109     return _pBrother;
00110 }

void osg::DrawTreeNode::setBrother DrawTreeNode pBrother  )  [inline]
 

Definition at line 113 of file OSGDrawTreeNode.inl.

References _pBrother.

Referenced by addChild(), insertChildAfter(), and insertFirstChild().

00114 {
00115     _pBrother = pBrother;
00116 }

void osg::DrawTreeNode::setGeometry Geometry pGeo  )  [inline]
 

Definition at line 119 of file OSGDrawTreeNode.inl.

References _pGeo.

Referenced by osg::RenderAction::dropGeometry().

00120 {
00121     _pGeo = pGeo;
00122 }

Geometry * osg::DrawTreeNode::getGeometry void   )  [inline]
 

Definition at line 125 of file OSGDrawTreeNode.inl.

References _pGeo.

Referenced by osg::RenderAction::draw(), and osg::RenderAction::dump().

00126 {
00127     return _pGeo;
00128 }

void osg::DrawTreeNode::setFunctor Material::DrawFunctor func  )  [inline]
 

Definition at line 131 of file OSGDrawTreeNode.inl.

References _functor, and _hasFunctor.

Referenced by osg::RenderAction::dropFunctor().

00132 {
00133     _functor=func;
00134     _hasFunctor=true;
00135 }

Material::DrawFunctor & osg::DrawTreeNode::getFunctor void   )  [inline]
 

Definition at line 138 of file OSGDrawTreeNode.inl.

References _functor.

Referenced by osg::RenderAction::draw().

00139 {
00140     return _functor;
00141 }

bool osg::DrawTreeNode::hasFunctor void   )  [inline]
 

Definition at line 144 of file OSGDrawTreeNode.inl.

References _hasFunctor.

Referenced by osg::RenderAction::draw().

00145 {
00146     return _hasFunctor;
00147 }

void osg::DrawTreeNode::setState State pState  )  [inline]
 

Definition at line 150 of file OSGDrawTreeNode.inl.

References _pState.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00151 {
00152     _pState = pState;
00153 }

State * osg::DrawTreeNode::getState void   )  [inline]
 

Definition at line 156 of file OSGDrawTreeNode.inl.

References _pState.

Referenced by osg::RenderAction::draw(), and osg::RenderAction::dump().

00157 {
00158     return _pState;
00159 }

void osg::DrawTreeNode::setNode NodePtr  pNode  )  [inline]
 

Definition at line 162 of file OSGDrawTreeNode.inl.

References _pNode.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00163 {
00164     _pNode = pNode;
00165 }

NodePtr osg::DrawTreeNode::getNode void   )  [inline]
 

Definition at line 168 of file OSGDrawTreeNode.inl.

References _pNode.

Referenced by osg::RenderAction::draw(), and osg::RenderAction::dump().

00169 {
00170     return _pNode;
00171 }

void osg::DrawTreeNode::setMatrixStore const RenderAction::MatrixStore oMatrixStore  )  [inline]
 

Definition at line 174 of file OSGDrawTreeNode.inl.

References _oMatrixStore.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00175 {
00176     _oMatrixStore = oMatrixStore;
00177 }

RenderAction::MatrixStore & osg::DrawTreeNode::getMatrixStore void   )  [inline]
 

Definition at line 180 of file OSGDrawTreeNode.inl.

References _oMatrixStore.

Referenced by osg::RenderAction::draw(), and osg::RenderAction::dump().

00181 {
00182     return _oMatrixStore;
00183 }

void osg::DrawTreeNode::setScalar Real32  rScalar  )  [inline]
 

Definition at line 186 of file OSGDrawTreeNode.inl.

References _rScalarVal.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00187 {
00188     _rScalarVal = rScalar;
00189 }

Real32 osg::DrawTreeNode::getScalar void   )  [inline]
 

Definition at line 192 of file OSGDrawTreeNode.inl.

References _rScalarVal.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00193 {
00194     return _rScalarVal;
00195 }

void osg::DrawTreeNode::setLightsState UInt64  state  )  [inline]
 

Definition at line 198 of file OSGDrawTreeNode.inl.

References _lightsState.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00199 {
00200     _lightsState = state;
00201 }

UInt64 osg::DrawTreeNode::getLightsState void   )  [inline]
 

Definition at line 204 of file OSGDrawTreeNode.inl.

References _lightsState.

Referenced by osg::RenderAction::activateLocalLights(), and osg::RenderAction::draw().

00205 {
00206     return _lightsState;
00207 }

void osg::DrawTreeNode::setMultiPass void   )  [inline]
 

Definition at line 210 of file OSGDrawTreeNode.inl.

References _flags, and MultiPass.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00211 {
00212     _flags |= DrawTreeNode::MultiPass;
00213 }

void osg::DrawTreeNode::setLastMultiPass void   )  [inline]
 

Definition at line 216 of file OSGDrawTreeNode.inl.

References _flags, and LastMultiPass.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00217 {
00218     _flags |= DrawTreeNode::LastMultiPass;
00219 }

bool osg::DrawTreeNode::isMultiPass void   )  [inline]
 

Definition at line 222 of file OSGDrawTreeNode.inl.

References _flags, LastMultiPass, and MultiPass.

Referenced by osg::RenderAction::draw().

00223 {
00224     return (_flags & DrawTreeNode::MultiPass) ||
00225            (_flags & DrawTreeNode::LastMultiPass);
00226 }

bool osg::DrawTreeNode::isLastMultiPass void   )  [inline]
 

Definition at line 229 of file OSGDrawTreeNode.inl.

References _flags, and LastMultiPass.

Referenced by osg::RenderAction::draw().

00230 {
00231     return (_flags & DrawTreeNode::LastMultiPass);
00232 }

void osg::DrawTreeNode::setNoStateSorting void   )  [inline]
 

Definition at line 235 of file OSGDrawTreeNode.inl.

References _flags, and NoStateSorting.

Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry().

00236 {
00237     _flags |= DrawTreeNode::NoStateSorting;
00238 }

bool osg::DrawTreeNode::isNoStateSorting void   )  [inline]
 

Definition at line 241 of file OSGDrawTreeNode.inl.

References _flags, and NoStateSorting.

Referenced by osg::RenderAction::draw().

00242 {
00243     return (_flags & DrawTreeNode::NoStateSorting);
00244 }

void osg::DrawTreeNode::reset void   )  [inline]
 

Definition at line 247 of file OSGDrawTreeNode.inl.

References _flags, _hasFunctor, _lightsState, _oMatrixStore, _pBrother, _pFirstChild, _pGeo, _pLastChild, _pState, _rScalarVal, osg::RenderAction::MatrixStore::first, osg::RenderAction::MatrixStore::second, and osg::TransformationMatrix< ValueTypeT >::setIdentity().

Referenced by osg::DrawTreeNodeFactory::create().

00248 {
00249     _pFirstChild = NULL;
00250     _pLastChild  = NULL;
00251     _pBrother    = NULL;
00252     _pState      = NULL;
00253     _pGeo        = NULL;
00254     _hasFunctor  = false;
00255 
00256     _oMatrixStore.first = 0;
00257     _oMatrixStore.second.setIdentity();
00258 
00259     _rScalarVal = 0.f;
00260 
00261     _lightsState = 0;
00262     _flags = 0;
00263 }

void osg::DrawTreeNode::operator= const DrawTreeNode source  )  [private]
 

void MemoryObject::addRef void   )  [inherited]
 

Definition at line 64 of file OSGMemoryObject.cpp.

References osg::MemoryObject::_refCount.

Referenced by osg::SharedObjectHandler::getSharedObject(), and osg::SharedObjectHandler::initialize().

00065 {
00066     _refCount++;
00067 }

void MemoryObject::subRef void   )  [inherited]
 

Definition at line 69 of file OSGMemoryObject.cpp.

References osg::MemoryObject::_refCount.

00070 {
00071     _refCount--;
00072 
00073     if(_refCount <= 0)
00074         delete this;
00075 }

Int32 MemoryObject::getRefCount void   )  [inherited]
 

Definition at line 77 of file OSGMemoryObject.cpp.

References osg::MemoryObject::_refCount.

00078 {
00079     return _refCount;
00080 }


Friends And Related Function Documentation

friend class DrawTreeNodeFactory [friend]
 

Definition at line 178 of file OSGDrawTreeNode.h.


Member Data Documentation

Int32 DrawTreeNode::_iCreateCount = 0 [static]
 

Definition at line 60 of file OSGDrawTreeNode.cpp.

Referenced by osg::RenderAction::start().

Int32 DrawTreeNode::_iDeleteCount = 0 [static]
 

Definition at line 61 of file OSGDrawTreeNode.cpp.

Referenced by osg::RenderAction::start().

const UInt8 DrawTreeNode::MultiPass = 1 [static]
 

Definition at line 66 of file OSGDrawTreeNode.cpp.

Referenced by isMultiPass(), and setMultiPass().

const UInt8 DrawTreeNode::LastMultiPass = 2 [static]
 

Definition at line 67 of file OSGDrawTreeNode.cpp.

Referenced by isLastMultiPass(), isMultiPass(), and setLastMultiPass().

const UInt8 DrawTreeNode::NoStateSorting = 4 [static]
 

Definition at line 68 of file OSGDrawTreeNode.cpp.

Referenced by isNoStateSorting(), and setNoStateSorting().

* DrawTreeNode* osg::DrawTreeNode::_pFirstChild [protected]
 

Definition at line 140 of file OSGDrawTreeNode.h.

Referenced by addChild(), getFirstChild(), insertFirstChild(), and reset().

DrawTreeNode* osg::DrawTreeNode::_pLastChild [protected]
 

Definition at line 141 of file OSGDrawTreeNode.h.

Referenced by addChild(), getLastChild(), insertChildAfter(), and reset().

DrawTreeNode* osg::DrawTreeNode::_pBrother [protected]
 

Definition at line 143 of file OSGDrawTreeNode.h.

Referenced by getBrother(), reset(), and setBrother().

NodePtr osg::DrawTreeNode::_pNode [protected]
 

Definition at line 145 of file OSGDrawTreeNode.h.

Referenced by getNode(), and setNode().

State* osg::DrawTreeNode::_pState [protected]
 

Definition at line 147 of file OSGDrawTreeNode.h.

Referenced by getState(), reset(), and setState().

Geometry* osg::DrawTreeNode::_pGeo [protected]
 

Definition at line 148 of file OSGDrawTreeNode.h.

Referenced by getGeometry(), reset(), and setGeometry().

Material::DrawFunctor osg::DrawTreeNode::_functor [protected]
 

Definition at line 149 of file OSGDrawTreeNode.h.

Referenced by getFunctor(), and setFunctor().

bool osg::DrawTreeNode::_hasFunctor [protected]
 

Definition at line 150 of file OSGDrawTreeNode.h.

Referenced by hasFunctor(), reset(), and setFunctor().

RenderAction::MatrixStore osg::DrawTreeNode::_oMatrixStore [protected]
 

Definition at line 152 of file OSGDrawTreeNode.h.

Referenced by DrawTreeNode(), getMatrixStore(), reset(), and setMatrixStore().

Real32 osg::DrawTreeNode::_rScalarVal [protected]
 

Definition at line 154 of file OSGDrawTreeNode.h.

Referenced by getScalar(), reset(), and setScalar().

UInt64 osg::DrawTreeNode::_lightsState [protected]
 

Definition at line 156 of file OSGDrawTreeNode.h.

Referenced by getLightsState(), reset(), and setLightsState().

Int8 osg::DrawTreeNode::_flags [protected]
 

Definition at line 158 of file OSGDrawTreeNode.h.

Referenced by isLastMultiPass(), isMultiPass(), isNoStateSorting(), reset(), setLastMultiPass(), setMultiPass(), and setNoStateSorting().


The documentation for this class was generated from the following files:
Generated on Thu Aug 25 04:19:04 2005 for OpenSG by  doxygen 1.4.3