#include <OSGDepthChunk.h>
Inheritance diagram for osg::DepthChunk:

Public Types | |
| typedef DepthChunkPtr | Ptr |
| enum | { EnableFieldId = Inherited::NextFieldId, FuncFieldId = EnableFieldId + 1, NearFieldId = FuncFieldId + 1, FarFieldId = NearFieldId + 1, ReadOnlyFieldId = FarFieldId + 1, NextFieldId = ReadOnlyFieldId + 1 } |
Public Member Functions | |
Chunk Class Access | |
| *virtual const StateChunkClass * | getClass (void) const |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
State Commands | |
| *virtual void | activate (DrawActionBase *action, UInt32 index=0) |
| virtual void | changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0) |
| virtual void | deactivate (DrawActionBase *action, UInt32 index=0) |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| assignment | |
| virtual bool | operator== (const StateChunk &other) const |
| equal | |
| virtual bool | operator!= (const StateChunk &other) const |
| unequal | |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFBool * | getSFEnable (void) |
| Get the DepthChunk::_sfEnable field. | |
| SFGLenum * | getSFFunc (void) |
| Get the DepthChunk::_sfFunc field. | |
| SFReal32 * | getSFNear (void) |
| Get the DepthChunk::_sfNear field. | |
| SFReal32 * | getSFFar (void) |
| Get the DepthChunk::_sfFar field. | |
| SFBool * | getSFReadOnly (void) |
| Get the DepthChunk::_sfReadOnly field. | |
| bool & | getEnable (void) |
| Get the value of the DepthChunk::_sfEnable field. | |
| const bool & | getEnable (void) const |
| Get the value of the DepthChunk::_sfEnable field. | |
| GLenum & | getFunc (void) |
| Get the value of the DepthChunk::_sfFunc field. | |
| const GLenum & | getFunc (void) const |
| Get the value of the DepthChunk::_sfFunc field. | |
| Real32 & | getNear (void) |
| Get the value of the DepthChunk::_sfNear field. | |
| const Real32 & | getNear (void) const |
| Get the value of the DepthChunk::_sfNear field. | |
| Real32 & | getFar (void) |
| Get the value of the DepthChunk::_sfFar field. | |
| const Real32 & | getFar (void) const |
| Get the value of the DepthChunk::_sfFar field. | |
| bool & | getReadOnly (void) |
| Get the value of the DepthChunk::_sfReadOnly field. | |
| const bool & | getReadOnly (void) const |
| Get the value of the DepthChunk::_sfReadOnly field. | |
Field Set | |
| *void | setEnable (const bool &value) |
| Set the value of the DepthChunk::_sfEnable field. | |
| void | setFunc (const GLenum &value) |
| Set the value of the DepthChunk::_sfFunc field. | |
| void | setNear (const Real32 &value) |
| Set the value of the DepthChunk::_sfNear field. | |
| void | setFar (const Real32 &value) |
| Set the value of the DepthChunk::_sfFar field. | |
| void | setReadOnly (const bool &value) |
| Set the value of the DepthChunk::_sfReadOnly field. | |
Binary Access | |
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
Copy | |
| *virtual FieldContainerPtr | shallowCopy (void) const |
Static Public Member Functions | |
Static Chunk Class Access | |
| *static UInt32 | getStaticClassId (void) |
| static const StateChunkClass * | getStaticClass (void) |
Class Get | |
| *static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
Construction | |
| *static DepthChunkPtr | create (void) |
| create a new instance of the class | |
| static DepthChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Public Attributes | |
| static const osg::BitVector | EnableFieldMask |
| static const osg::BitVector | FuncFieldMask |
| static const osg::BitVector | NearFieldMask |
| static const osg::BitVector | FarFieldMask |
| static const osg::BitVector | ReadOnlyFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
Protected Member Functions | |
Constructors | |
| * | DepthChunk (void) |
| DepthChunk (const DepthChunk &source) | |
Destructors | |
| *virtual | ~DepthChunk (void) |
Sync | |
| *void | executeSyncImpl (DepthChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Protected Attributes | |
Fields | |
| *SFBool | _sfEnable |
| SFGLenum | _sfFunc |
| SFReal32 | _sfNear |
| SFReal32 | _sfFar |
| SFBool | _sfReadOnly |
Private Types | |
| typedef DepthChunkBase | Inherited |
Private Member Functions | |
| void | operator= (const DepthChunk &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
Static Private Attributes | |
| static StateChunkClass | _class |
Friends | |
| class | FieldContainer |
| class | DepthChunkBase |
The parameters of the following functions are wrapped here: glDepthFunc (osg::DepthChunk::_sfFunc), glDepthRange (osg::DepthChunk::_sfNear, osg::DepthChunk::_sfFar), glEnable(GL_DEPTH_TEST) (osg::DepthChunk::_sfEnable).
Definition at line 55 of file OSGDepthChunk.h.
|
|
Reimplemented from osg::DepthChunkBase. Definition at line 59 of file OSGDepthChunk.h. |
|
|
Reimplemented from osg::StateChunkBase. Definition at line 94 of file OSGDepthChunkBase.h. |
|
|
Reimplemented from osg::Attachment. Definition at line 96 of file OSGDepthChunkBase.h. 00097 { 00098 EnableFieldId = Inherited::NextFieldId, 00099 FuncFieldId = EnableFieldId + 1, 00100 NearFieldId = FuncFieldId + 1, 00101 FarFieldId = NearFieldId + 1, 00102 ReadOnlyFieldId = FarFieldId + 1, 00103 NextFieldId = ReadOnlyFieldId + 1 00104 };
|
|
|
Definition at line 95 of file OSGDepthChunk.cpp. 00095 : 00096 Inherited() 00097 { 00098 }
|
|
|
Definition at line 100 of file OSGDepthChunk.cpp. 00100 : 00101 Inherited(source) 00102 { 00103 }
|
|
|
Definition at line 105 of file OSGDepthChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 111 of file OSGDepthChunk.cpp. References _class. 00112 { 00113 return &_class; 00114 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 46 of file OSGDepthChunk.inl. References osg::StateChunkClass::getId(), and getStaticClass(). 00047 { 00048 return getStaticClass()->getId(); 00049 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 52 of file OSGDepthChunk.inl. References _class. Referenced by getStaticClassId(). 00053 { 00054 return &DepthChunk::_class; 00055 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 118 of file OSGDepthChunk.cpp. References osg::StateChunk::changed(). 00119 { 00120 Inherited::changed(whichField, origin); 00121 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 123 of file OSGDepthChunk.cpp. References SLOG. 00125 { 00126 SLOG << "Dump DepthChunk NI" << std::endl; 00127 }
|
|
||||||||||||
|
Activate the chunk, i.e. set the OpenGl state covered by the chunk which is different from the default state to the given state. Reimplemented from osg::StateChunk. Definition at line 132 of file OSGDepthChunk.cpp. References osg::DepthChunkBase::_sfFunc, osg::DepthChunkBase::getEnable(), osg::DepthChunkBase::getFar(), osg::DepthChunkBase::getNear(), osg::DepthChunkBase::getReadOnly(), and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by changeFrom(). 00133 { 00134 if(_sfFunc.getValue() != GL_NONE) 00135 { 00136 glDepthFunc(_sfFunc.getValue()); 00137 } 00138 00139 if(getNear() >= 0 && getFar() >= 0) 00140 { 00141 glDepthRange(getNear(), getFar()); 00142 } 00143 00144 if(getEnable()) 00145 { 00146 glEnable(GL_DEPTH_TEST); 00147 } 00148 else 00149 { 00150 glDisable(GL_DEPTH_TEST); 00151 } 00152 00153 glDepthMask(!getReadOnly()); 00154 }
|
|
||||||||||||||||
|
Change from an old chunk of the same type to this chunk. Note that in general no type checking is done, make sure to use this on a legal combination of chunks! Reimplemented from osg::StateChunk. Definition at line 156 of file OSGDepthChunk.cpp. References activate(), and osg::StateChunk::deactivate(). 00157 { 00158 old_chunk->deactivate( act, index ); 00159 activate( act, index ); 00160 }
|
|
||||||||||||
|
Deactivate the chunk, i.e. set the OpenGl state covered by the chunk which is different from the default state to the default state. Reimplemented from osg::StateChunk. Definition at line 162 of file OSGDepthChunk.cpp. References osg::DepthChunkBase::_sfFunc, osg::DepthChunkBase::getEnable(), osg::DepthChunkBase::getFar(), osg::DepthChunkBase::getNear(), and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00163 { 00164 if(_sfFunc.getValue() != GL_NONE) 00165 { 00166 glDepthFunc(GL_LEQUAL); 00167 } 00168 00169 if(getNear() >= 0 && getFar() >= 0) 00170 { 00171 glDepthRange(0, 1); 00172 } 00173 00174 if(!getEnable()) 00175 { 00176 glEnable(GL_DEPTH_TEST); 00177 } 00178 00179 glDepthMask(GL_TRUE); 00180 }
|
|
|
Calculate how expensive it is to switch from one instance of the chunk class to another. In most cases not implemented yet, will return 0. Reimplemented from osg::StateChunk. Definition at line 184 of file OSGDepthChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 192 of file OSGDepthChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 200 of file OSGDepthChunk.cpp. References osg::DepthChunkBase::getEnable(), osg::DepthChunkBase::getFar(), osg::DepthChunkBase::getFunc(), osg::DepthChunkBase::getNear(), and osg::DepthChunkBase::getReadOnly(). 00201 { 00202 DepthChunk const *tother = dynamic_cast<DepthChunk const*>(&other); 00203 00204 if(!tother) 00205 return false; 00206 00207 if(tother == this) 00208 return true; 00209 00210 if(getEnable() != tother->getEnable() || 00211 getFunc() != tother->getFunc() || 00212 getFar() != tother->getFar() || 00213 getNear() != tother->getNear() || 00214 getReadOnly() != tother->getReadOnly() ) 00215 return false; 00216 00217 return true; 00218 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 223 of file OSGDepthChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 80 of file OSGDepthChunk.cpp.
|
|
|
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 58 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_type. Referenced by osg::DepthChunkBase::create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 65 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 151 of file OSGDepthChunkBase.cpp. References osg::DepthChunkBase::_type. 00152 { 00153 return _type; 00154 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 156 of file OSGDepthChunkBase.cpp. References osg::DepthChunkBase::_type. 00157 { 00158 return _type; 00159 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 171 of file OSGDepthChunkBase.cpp. 00172 { 00173 return sizeof(DepthChunk); 00174 }
|
|
|
Definition at line 101 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfEnable. 00102 { 00103 return &_sfEnable; 00104 }
|
|
|
Definition at line 108 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfFunc. 00109 { 00110 return &_sfFunc; 00111 }
|
|
|
Definition at line 115 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfNear. 00116 { 00117 return &_sfNear; 00118 }
|
|
|
Definition at line 122 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfFar. 00123 { 00124 return &_sfFar; 00125 }
|
|
|
Definition at line 129 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfReadOnly. 00130 { 00131 return &_sfReadOnly; 00132 }
|
|
|
Definition at line 137 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfEnable, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), deactivate(), and operator==(). 00138 { 00139 return _sfEnable.getValue(); 00140 }
|
|
|
Definition at line 144 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfEnable, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00145 { 00146 return _sfEnable.getValue(); 00147 }
|
|
|
Definition at line 158 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfFunc, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by operator==(). 00159 { 00160 return _sfFunc.getValue(); 00161 }
|
|
|
Definition at line 165 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfFunc, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00166 { 00167 return _sfFunc.getValue(); 00168 }
|
|
|
Definition at line 179 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfNear, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), deactivate(), and operator==(). 00180 { 00181 return _sfNear.getValue(); 00182 }
|
|
|
Definition at line 186 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfNear, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00187 { 00188 return _sfNear.getValue(); 00189 }
|
|
|
Definition at line 200 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfFar, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), deactivate(), and operator==(). 00201 { 00202 return _sfFar.getValue(); 00203 }
|
|
|
Definition at line 207 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfFar, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00208 { 00209 return _sfFar.getValue(); 00210 }
|
|
|
Definition at line 221 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfReadOnly, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), and operator==(). 00222 { 00223 return _sfReadOnly.getValue(); 00224 }
|
|
|
Definition at line 228 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfReadOnly, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00229 { 00230 return _sfReadOnly.getValue(); 00231 }
|
|
|
Definition at line 151 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfEnable, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 172 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfFunc, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 193 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfNear, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 214 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfFar, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 235 of file OSGDepthChunkBase.inl. References osg::DepthChunkBase::_sfReadOnly, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00236 { 00237 _sfReadOnly.setValue(value); 00238 }
|
|
|
||||||||||||