#include <OSGDrawTreeNode.h>
Public Types | |
| typedef Material::DrawFunctor | DrawFunctor |
| typedef RenderAction::MatrixStore | MatrixStore |
Public Member Functions | |
Access | |
| DrawTreeNode * | getFirstChild (void) |
| DrawTreeNode * | getLastChild (void) |
| void | addChild (DrawTreeNode *pChild) |
| void | insertFirstChild (DrawTreeNode *pChild) |
| void | insertChildAfter (DrawTreeNode *pCurrent, DrawTreeNode *pChild) |
| DrawTreeNode * | getBrother (void) |
| void | setBrother (DrawTreeNode *pBrother) |
| void | setGeometry (MaterialDrawable *pGeo) |
| MaterialDrawable * | getGeometry (void) |
| void | setFunctor (DrawFunctor &func) |
| DrawFunctor & | getFunctor (void) |
| bool | hasFunctor (void) |
| void | setState (State *pState) |
| State * | getState (void) |
| void | setNode (NodePtr pNode) |
| NodePtr | getNode (void) |
| void | setMatrixStore (const MatrixStore &oMatrixStore) |
| MatrixStore & | getMatrixStore (void) |
| void | setScalar (Real rScalar) |
| Real | getScalar (void) |
| void | setLightsState (UInt64 state) |
| UInt64 | getLightsState (void) |
| void | setClipPlanesState (UInt32 state) |
| UInt32 | getClipPlanesState (void) |
| void | setMultiPass (void) |
| void | setLastMultiPass (void) |
| bool | isMultiPass (void) |
| bool | isLastMultiPass (void) |
| void | setNoStateSorting (void) |
| bool | isNoStateSorting (void) |
| void | reset (void) |
Static Public Attributes | |
Flags | |
| static const UInt8 | MultiPass = 1 |
| static const UInt8 | LastMultiPass = 2 |
| static const UInt8 | NoStateSorting = 4 |
Protected Member Functions | |
Constructors | |
| DrawTreeNode (void) | |
Destructor | |
| virtual | ~DrawTreeNode (void) |
Protected Attributes | |
Member | |
| DrawTreeNode * | _pFirstChild |
| DrawTreeNode * | _pLastChild |
| DrawTreeNode * | _pBrother |
| NodePtr | _pNode |
| State * | _pState |
| MaterialDrawable * | _pGeo |
| Material::DrawFunctor | _functor |
| bool | _hasFunctor |
| MatrixStore | _oMatrixStore |
| Real | _rScalarVal |
| UInt64 | _lightsState |
| UInt32 | _clipPlanesState |
| 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 |
Definition at line 62 of file OSGDrawTreeNode.h.
Definition at line 68 of file OSGDrawTreeNode.h.
Definition at line 69 of file OSGDrawTreeNode.h.
| DrawTreeNode::DrawTreeNode | ( | void | ) | [protected] |
Definition at line 63 of file OSGDrawTreeNode.cpp.
References _oMatrixStore, and OSG::RenderAction::MatrixStore::first.
00063 : 00064 _pFirstChild (NULL ), 00065 _pLastChild (NULL ), 00066 _pBrother (NULL ), 00067 _pState (NULL ), 00068 _pGeo (NULL ), 00069 _functor ( ), 00070 _hasFunctor (false), 00071 _oMatrixStore ( ), 00072 _rScalarVal (0.f ), 00073 _lightsState (0 ), 00074 _clipPlanesState (0 ), 00075 _flags (0 ) 00076 { 00077 _oMatrixStore.first = 0; 00078 }
| DrawTreeNode::~DrawTreeNode | ( | void | ) | [protected, virtual] |
| OSG::DrawTreeNode::DrawTreeNode | ( | const DrawTreeNode & | source | ) | [private] |
| DrawTreeNode * OSG::DrawTreeNode::getFirstChild | ( | void | ) | [inline] |
Definition at line 46 of file OSGDrawTreeNode.inl.
References _pFirstChild.
Referenced by OSG::RenderAction::draw(), OSG::RenderAction::drawMultiFrameOcclusionBB(), 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 71 of file OSGDrawTreeNode.inl.
References _pFirstChild, _pLastChild, and setBrother().
Referenced by OSG::RenderAction::dropFunctor(), OSG::RenderAction::dropGeometry(), and insertFirstChild().
00072 { 00073 if(_pLastChild == NULL) 00074 { 00075 _pFirstChild = pChild; 00076 _pLastChild = pChild; 00077 } 00078 else 00079 { 00080 _pLastChild->setBrother(pChild); 00081 _pLastChild = pChild; 00082 } 00083 }
| void OSG::DrawTreeNode::insertFirstChild | ( | DrawTreeNode * | pChild | ) | [inline] |
Definition at line 86 of file OSGDrawTreeNode.inl.
References _pFirstChild, addChild(), and setBrother().
00087 { 00088 if(pChild == NULL) 00089 return; 00090 00091 if(_pFirstChild == NULL) 00092 { 00093 addChild(pChild); 00094 } 00095 else 00096 { 00097 pChild->setBrother(_pFirstChild); 00098 00099 _pFirstChild = pChild; 00100 } 00101 00102 }
| void OSG::DrawTreeNode::insertChildAfter | ( | DrawTreeNode * | pCurrent, | |
| DrawTreeNode * | pChild | |||
| ) | [inline] |
Definition at line 105 of file OSGDrawTreeNode.inl.
References _pLastChild, getBrother(), and setBrother().
00107 { 00108 if(pCurrent == NULL || pChild == NULL) 00109 return; 00110 00111 pChild ->setBrother(pCurrent->getBrother()); 00112 pCurrent->setBrother(pChild ); 00113 00114 if(pCurrent == _pLastChild) 00115 { 00116 _pLastChild = pChild; 00117 } 00118 }
| DrawTreeNode * OSG::DrawTreeNode::getBrother | ( | void | ) | [inline] |
Definition at line 58 of file OSGDrawTreeNode.inl.
References _pBrother.
Referenced by OSG::RenderAction::draw(), OSG::RenderAction::drawMultiFrameOcclusionBB(), OSG::RenderAction::dropFunctor(), OSG::RenderAction::dump(), and insertChildAfter().
00059 { 00060 return _pBrother; 00061 }
| void OSG::DrawTreeNode::setBrother | ( | DrawTreeNode * | pBrother | ) | [inline] |
Definition at line 64 of file OSGDrawTreeNode.inl.
References _pBrother.
Referenced by addChild(), insertChildAfter(), and insertFirstChild().
00065 { 00066 _pBrother = pBrother; 00067 }
| void OSG::DrawTreeNode::setGeometry | ( | MaterialDrawable * | pGeo | ) | [inline] |
Definition at line 122 of file OSGDrawTreeNode.inl.
References _pGeo.
Referenced by OSG::RenderAction::dropGeometry().
00123 { 00124 _pGeo = pGeo; 00125 }
| MaterialDrawable * OSG::DrawTreeNode::getGeometry | ( | void | ) | [inline] |
Definition at line 128 of file OSGDrawTreeNode.inl.
References _pGeo.
Referenced by OSG::RenderAction::draw(), and OSG::RenderAction::dump().
00129 { 00130 return _pGeo; 00131 }
| void OSG::DrawTreeNode::setFunctor | ( | DrawFunctor & | func | ) |
Referenced by OSG::RenderAction::dropFunctor().
| Material::DrawFunctor & OSG::DrawTreeNode::getFunctor | ( | void | ) | [inline] |
Definition at line 141 of file OSGDrawTreeNode.inl.
References _functor.
Referenced by OSG::RenderAction::draw().
00142 { 00143 return _functor; 00144 }
| bool OSG::DrawTreeNode::hasFunctor | ( | void | ) | [inline] |
Definition at line 147 of file OSGDrawTreeNode.inl.
References _hasFunctor.
Referenced by OSG::RenderAction::draw(), OSG::RenderAction::drawMultiFrameOcclusionBB(), and OSG::RenderAction::isOccluded().
00148 { 00149 return _hasFunctor; 00150 }
| void OSG::DrawTreeNode::setState | ( | State * | pState | ) | [inline] |
Definition at line 153 of file OSGDrawTreeNode.inl.
References _pState.
Referenced by OSG::RenderAction::dropFunctor(), and OSG::RenderAction::dropGeometry().
00154 { 00155 _pState = pState; 00156 }
| State * OSG::DrawTreeNode::getState | ( | void | ) | [inline] |
Definition at line 159 of file OSGDrawTreeNode.inl.
References _pState.
Referenced by OSG::RenderAction::draw(), and OSG::RenderAction::dump().
00160 { 00161 return _pState; 00162 }
| void OSG::DrawTreeNode::setNode | ( | NodePtr | pNode | ) | [inline] |
Definition at line 165 of file OSGDrawTreeNode.inl.
References _pNode.
Referenced by OSG::RenderAction::dropFunctor(), and OSG::RenderAction::dropGeometry().
00166 { 00167 _pNode = pNode; 00168 }
| NodePtr OSG::DrawTreeNode::getNode | ( | void | ) | [inline] |
Definition at line 171 of file OSGDrawTreeNode.inl.
References _pNode.
Referenced by OSG::RenderAction::draw(), OSG::RenderAction::drawMultiFrameOcclusionBB(), OSG::RenderAction::dump(), and OSG::RenderAction::isOccluded().
00172 { 00173 return _pNode; 00174 }
| void OSG::DrawTreeNode::setMatrixStore | ( | const MatrixStore & | oMatrixStore | ) | [inline] |
Definition at line 177 of file OSGDrawTreeNode.inl.
References _oMatrixStore.
Referenced by OSG::RenderAction::dropFunctor(), and OSG::RenderAction::dropGeometry().
00178 { 00179 _oMatrixStore = oMatrixStore; 00180 }
| DrawTreeNode::MatrixStore & OSG::DrawTreeNode::getMatrixStore | ( | void | ) | [inline] |
Definition at line 183 of file OSGDrawTreeNode.inl.
References _oMatrixStore.
Referenced by OSG::RenderAction::draw(), OSG::RenderAction::drawMultiFrameOcclusionBB(), and OSG::RenderAction::dump().
00184 { 00185 return _oMatrixStore; 00186 }
| void OSG::DrawTreeNode::setScalar | ( | Real | rScalar | ) | [inline] |
Definition at line 189 of file OSGDrawTreeNode.inl.
References _rScalarVal.
Referenced by OSG::RenderAction::dropFunctor().
00190 { 00191 _rScalarVal = rScalar; 00192 }
| Real OSG::DrawTreeNode::getScalar | ( | void | ) | [inline] |
Definition at line 195 of file OSGDrawTreeNode.inl.
References _rScalarVal.
Referenced by OSG::RenderAction::dropFunctor().
00196 { 00197 return _rScalarVal; 00198 }
| void OSG::DrawTreeNode::setLightsState | ( | UInt64 | state | ) | [inline] |
Definition at line 201 of file OSGDrawTreeNode.inl.
References _lightsState.
Referenced by OSG::RenderAction::dropFunctor(), and OSG::RenderAction::dropGeometry().
00202 { 00203 _lightsState = state; 00204 }
| UInt64 OSG::DrawTreeNode::getLightsState | ( | void | ) | [inline] |
Definition at line 207 of file OSGDrawTreeNode.inl.
References _lightsState.
Referenced by OSG::RenderAction::activateLocalLights(), and OSG::RenderAction::draw().
00208 { 00209 return _lightsState; 00210 }
| void OSG::DrawTreeNode::setClipPlanesState | ( | UInt32 | state | ) | [inline] |
Definition at line 213 of file OSGDrawTreeNode.inl.
References _clipPlanesState.
Referenced by OSG::RenderAction::dropFunctor(), and OSG::RenderAction::dropGeometry().
00214 { 00215 _clipPlanesState = state; 00216 }
| UInt32 OSG::DrawTreeNode::getClipPlanesState | ( | void | ) | [inline] |
Definition at line 219 of file OSGDrawTreeNode.inl.
References _clipPlanesState.
Referenced by OSG::RenderAction::activateLocalClipPlanes().
00220 { 00221 return _clipPlanesState; 00222 }
| void OSG::DrawTreeNode::setMultiPass | ( | void | ) | [inline] |
Definition at line 225 of file OSGDrawTreeNode.inl.
References _flags, and MultiPass.
Referenced by OSG::RenderAction::dropFunctor(), and OSG::RenderAction::dropGeometry().
00226 { 00227 _flags |= DrawTreeNode::MultiPass; 00228 }
| void OSG::DrawTreeNode::setLastMultiPass | ( | void | ) | [inline] |
Definition at line 231 of file OSGDrawTreeNode.inl.
References _flags, and LastMultiPass.
Referenced by OSG::RenderAction::dropFunctor(), and OSG::RenderAction::dropGeometry().
00232 { 00233 _flags |= DrawTreeNode::LastMultiPass; 00234 }
| bool OSG::DrawTreeNode::isMultiPass | ( | void | ) | [inline] |
Definition at line 237 of file OSGDrawTreeNode.inl.
References _flags, LastMultiPass, and MultiPass.
00238 { 00239 return (_flags & DrawTreeNode::MultiPass) || 00240 (_flags & DrawTreeNode::LastMultiPass); 00241 }
| bool OSG::DrawTreeNode::isLastMultiPass | ( | void | ) | [inline] |
Definition at line 244 of file OSGDrawTreeNode.inl.
References _flags, and LastMultiPass.
Referenced by OSG::RenderAction::draw().
00245 { 00246 return (_flags & DrawTreeNode::LastMultiPass); 00247 }
| void OSG::DrawTreeNode::setNoStateSorting | ( | void | ) | [inline] |
Definition at line 250 of file OSGDrawTreeNode.inl.
References _flags, and NoStateSorting.
Referenced by OSG::RenderAction::dropFunctor(), and OSG::RenderAction::dropGeometry().
00251 { 00252 _flags |= DrawTreeNode::NoStateSorting; 00253 }
| bool OSG::DrawTreeNode::isNoStateSorting | ( | void | ) | [inline] |
Definition at line 256 of file OSGDrawTreeNode.inl.
References _flags, and NoStateSorting.
Referenced by OSG::RenderAction::draw().
00257 { 00258 return (_flags & DrawTreeNode::NoStateSorting); 00259 }
| void OSG::DrawTreeNode::reset | ( | void | ) | [inline] |
Definition at line 262 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().
00263 { 00264 _pFirstChild = NULL; 00265 _pLastChild = NULL; 00266 _pBrother = NULL; 00267 _pState = NULL; 00268 _pGeo = NULL; 00269 _hasFunctor = false; 00270 00271 _oMatrixStore.first = 0; 00272 _oMatrixStore.second.setIdentity(); 00273 00274 _rScalarVal = 0.f; 00275 00276 _lightsState = 0; 00277 _flags = 0; 00278 }
| void OSG::DrawTreeNode::operator= | ( | const DrawTreeNode & | source | ) | [private] |
friend class DrawTreeNodeFactory [friend] |
Definition at line 180 of file OSGDrawTreeNode.h.
const UInt8 DrawTreeNode::MultiPass = 1 [static] |
const UInt8 DrawTreeNode::LastMultiPass = 2 [static] |
Definition at line 76 of file OSGDrawTreeNode.h.
Referenced by isLastMultiPass(), isMultiPass(), and setLastMultiPass().
const UInt8 DrawTreeNode::NoStateSorting = 4 [static] |
Definition at line 77 of file OSGDrawTreeNode.h.
Referenced by isNoStateSorting(), and setNoStateSorting().
DrawTreeNode* OSG::DrawTreeNode::_pFirstChild [protected] |
Definition at line 139 of file OSGDrawTreeNode.h.
Referenced by addChild(), getFirstChild(), insertFirstChild(), and reset().
DrawTreeNode* OSG::DrawTreeNode::_pLastChild [protected] |
Definition at line 140 of file OSGDrawTreeNode.h.
Referenced by addChild(), getLastChild(), insertChildAfter(), and reset().
DrawTreeNode* OSG::DrawTreeNode::_pBrother [protected] |
Definition at line 142 of file OSGDrawTreeNode.h.
Referenced by getBrother(), reset(), and setBrother().
NodePtr OSG::DrawTreeNode::_pNode [protected] |
State* OSG::DrawTreeNode::_pState [protected] |
Definition at line 146 of file OSGDrawTreeNode.h.
Referenced by getState(), reset(), and setState().
MaterialDrawable* OSG::DrawTreeNode::_pGeo [protected] |
Definition at line 147 of file OSGDrawTreeNode.h.
Referenced by getGeometry(), reset(), and setGeometry().
Material::DrawFunctor OSG::DrawTreeNode::_functor [protected] |
bool OSG::DrawTreeNode::_hasFunctor [protected] |
MatrixStore OSG::DrawTreeNode::_oMatrixStore [protected] |
Definition at line 151 of file OSGDrawTreeNode.h.
Referenced by DrawTreeNode(), getMatrixStore(), reset(), and setMatrixStore().
Real OSG::DrawTreeNode::_rScalarVal [protected] |
Definition at line 153 of file OSGDrawTreeNode.h.
Referenced by getScalar(), reset(), and setScalar().
UInt64 OSG::DrawTreeNode::_lightsState [protected] |
Definition at line 155 of file OSGDrawTreeNode.h.
Referenced by getLightsState(), reset(), and setLightsState().
UInt32 OSG::DrawTreeNode::_clipPlanesState [protected] |
Definition at line 156 of file OSGDrawTreeNode.h.
Referenced by getClipPlanesState(), and setClipPlanesState().
Int8 OSG::DrawTreeNode::_flags [protected] |
Definition at line 158 of file OSGDrawTreeNode.h.
Referenced by isLastMultiPass(), isMultiPass(), isNoStateSorting(), reset(), setLastMultiPass(), setMultiPass(), and setNoStateSorting().