#include <OSGColorMaskChunk.h>
Inheritance diagram for osg::ColorMaskChunk:

Public Types | |
| typedef ColorMaskChunkPtr | Ptr |
| enum | { MaskRFieldId = Inherited::NextFieldId, MaskGFieldId = MaskRFieldId + 1, MaskBFieldId = MaskGFieldId + 1, MaskAFieldId = MaskBFieldId + 1, NextFieldId = MaskAFieldId + 1 } |
Public Member Functions | |
Chunk Class Access | |
| *virtual const StateChunkClass * | getClass (void) 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 | |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
Field Set | |
| *void | setMask (const bool &r, const bool &g, const bool &b, const bool &a) |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFBool * | getSFMaskR (void) |
| Get the ColorMaskChunk::_sfMaskR field. | |
| SFBool * | getSFMaskG (void) |
| Get the ColorMaskChunk::_sfMaskG field. | |
| SFBool * | getSFMaskB (void) |
| Get the ColorMaskChunk::_sfMaskB field. | |
| SFBool * | getSFMaskA (void) |
| Get the ColorMaskChunk::_sfMaskA field. | |
| bool & | getMaskR (void) |
| Get the value of the ColorMaskChunk::_sfMaskR field. | |
| const bool & | getMaskR (void) const |
| Get the value of the ColorMaskChunk::_sfMaskR field. | |
| bool & | getMaskG (void) |
| Get the value of the ColorMaskChunk::_sfMaskG field. | |
| const bool & | getMaskG (void) const |
| Get the value of the ColorMaskChunk::_sfMaskG field. | |
| bool & | getMaskB (void) |
| Get the value of the ColorMaskChunk::_sfMaskB field. | |
| const bool & | getMaskB (void) const |
| Get the value of the ColorMaskChunk::_sfMaskB field. | |
| bool & | getMaskA (void) |
| Get the value of the ColorMaskChunk::_sfMaskA field. | |
| const bool & | getMaskA (void) const |
| Get the value of the ColorMaskChunk::_sfMaskA field. | |
Field Set | |
| *void | setMaskR (const bool &value) |
| Set the value of the ColorMaskChunk::_sfMaskR field. | |
| void | setMaskG (const bool &value) |
| Set the value of the ColorMaskChunk::_sfMaskG field. | |
| void | setMaskB (const bool &value) |
| Set the value of the ColorMaskChunk::_sfMaskB field. | |
| void | setMaskA (const bool &value) |
| Set the value of the ColorMaskChunk::_sfMaskA 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 ColorMaskChunkPtr | create (void) |
| create a new instance of the class | |
| static ColorMaskChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Public Attributes | |
| static const osg::BitVector | MaskRFieldMask |
| static const osg::BitVector | MaskGFieldMask |
| static const osg::BitVector | MaskBFieldMask |
| static const osg::BitVector | MaskAFieldMask |
| 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 | |
| * | ColorMaskChunk (void) |
| ColorMaskChunk (const ColorMaskChunk &source) | |
Destructors | |
| *virtual | ~ColorMaskChunk (void) |
Sync | |
| *void | executeSyncImpl (ColorMaskChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Protected Attributes | |
Fields | |
| *SFBool | _sfMaskR |
| SFBool | _sfMaskG |
| SFBool | _sfMaskB |
| SFBool | _sfMaskA |
Private Types | |
| typedef ColorMaskChunkBase | Inherited |
Private Member Functions | |
| void | operator= (const ColorMaskChunk &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
Static Private Attributes | |
| static StateChunkClass | _class |
Friends | |
| class | FieldContainer |
| class | ColorMaskChunkBase |
Definition at line 55 of file OSGColorMaskChunk.h.
|
|
Reimplemented from osg::ColorMaskChunkBase. Definition at line 59 of file OSGColorMaskChunk.h. |
|
|
Reimplemented from osg::StateChunkBase. Definition at line 93 of file OSGColorMaskChunkBase.h. |
|
|
Reimplemented from osg::Attachment. Definition at line 95 of file OSGColorMaskChunkBase.h. 00096 { 00097 MaskRFieldId = Inherited::NextFieldId, 00098 MaskGFieldId = MaskRFieldId + 1, 00099 MaskBFieldId = MaskGFieldId + 1, 00100 MaskAFieldId = MaskBFieldId + 1, 00101 NextFieldId = MaskAFieldId + 1 00102 };
|
|
|
Definition at line 85 of file OSGColorMaskChunk.cpp. 00085 : 00086 Inherited() 00087 { 00088 }
|
|
|
Definition at line 90 of file OSGColorMaskChunk.cpp. 00090 : 00091 Inherited(source) 00092 { 00093 }
|
|
|
Definition at line 95 of file OSGColorMaskChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 101 of file OSGColorMaskChunk.cpp. References _class. 00102 { 00103 return &_class; 00104 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 46 of file OSGColorMaskChunk.inl. References osg::StateChunkClass::getId(), and getStaticClass(). 00047 { 00048 return getStaticClass()->getId(); 00049 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 52 of file OSGColorMaskChunk.inl. References _class. Referenced by getStaticClassId(). 00053 { 00054 return &ColorMaskChunk::_class; 00055 }
|
|
||||||||||||
|
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 121 of file OSGColorMaskChunk.cpp. References osg::ColorMaskChunkBase::getMaskA(), osg::ColorMaskChunkBase::getMaskB(), osg::ColorMaskChunkBase::getMaskG(), and osg::ColorMaskChunkBase::getMaskR(). Referenced by changeFrom().
|
|
||||||||||||||||
|
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 126 of file OSGColorMaskChunk.cpp. References activate(), and osg::StateChunk::deactivate(). 00127 { 00128 old_chunk->deactivate( act, index ); 00129 activate( act, index ); 00130 }
|
|
||||||||||||
|
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 132 of file OSGColorMaskChunk.cpp.
|
|
|
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 139 of file OSGColorMaskChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 147 of file OSGColorMaskChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 155 of file OSGColorMaskChunk.cpp. References osg::ColorMaskChunkBase::getMaskA(), osg::ColorMaskChunkBase::getMaskB(), osg::ColorMaskChunkBase::getMaskG(), and osg::ColorMaskChunkBase::getMaskR(). 00156 { 00157 ColorMaskChunk const *tother = dynamic_cast<ColorMaskChunk const*>(&other); 00158 00159 if(!tother) 00160 return false; 00161 00162 if(tother == this) 00163 return true; 00164 00165 if(getMaskR() != tother->getMaskR() || 00166 getMaskG() != tother->getMaskG() || 00167 getMaskB() != tother->getMaskB() || 00168 getMaskA() != tother->getMaskA() ) 00169 return false; 00170 00171 return true; 00172 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 177 of file OSGColorMaskChunk.cpp.
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 108 of file OSGColorMaskChunk.cpp. References osg::StateChunk::changed(). 00109 { 00110 Inherited::changed(whichField, origin); 00111 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 113 of file OSGColorMaskChunk.cpp. References SLOG. 00115 { 00116 SLOG << "Dump ColorMaskChunk NI" << std::endl; 00117 }
|
|
||||||||||||||||||||
|
Definition at line 58 of file OSGColorMaskChunk.inl. References osg::ColorMaskChunkBase::_sfMaskA, osg::ColorMaskChunkBase::_sfMaskB, osg::ColorMaskChunkBase::_sfMaskG, osg::ColorMaskChunkBase::_sfMaskR, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00062 { 00063 _sfMaskR.setValue(r); 00064 _sfMaskG.setValue(g); 00065 _sfMaskB.setValue(b); 00066 _sfMaskA.setValue(a); 00067 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 70 of file OSGColorMaskChunk.cpp.
|
|
|
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 58 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_type. Referenced by osg::ColorMaskChunkBase::create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 65 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 139 of file OSGColorMaskChunkBase.cpp. References osg::ColorMaskChunkBase::_type. 00140 { 00141 return _type; 00142 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 144 of file OSGColorMaskChunkBase.cpp. References osg::ColorMaskChunkBase::_type. 00145 { 00146 return _type; 00147 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 159 of file OSGColorMaskChunkBase.cpp. 00160 { 00161 return sizeof(ColorMaskChunk); 00162 }
|
|
|
Definition at line 101 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskR. 00102 { 00103 return &_sfMaskR; 00104 }
|
|
|
Definition at line 108 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskG. 00109 { 00110 return &_sfMaskG; 00111 }
|
|
|
Definition at line 115 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskB. 00116 { 00117 return &_sfMaskB; 00118 }
|
|
|
Definition at line 122 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskA. 00123 { 00124 return &_sfMaskA; 00125 }
|
|
|
Definition at line 130 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskR, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), and operator==(). 00131 { 00132 return _sfMaskR.getValue(); 00133 }
|
|
|
Definition at line 137 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskR, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00138 { 00139 return _sfMaskR.getValue(); 00140 }
|
|
|
Definition at line 151 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskG, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), and operator==(). 00152 { 00153 return _sfMaskG.getValue(); 00154 }
|
|
|
Definition at line 158 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskG, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00159 { 00160 return _sfMaskG.getValue(); 00161 }
|
|
|
Definition at line 172 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskB, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), and operator==(). 00173 { 00174 return _sfMaskB.getValue(); 00175 }
|
|
|
Definition at line 179 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskB, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00180 { 00181 return _sfMaskB.getValue(); 00182 }
|
|
|
Definition at line 193 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskA, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by activate(), and operator==(). 00194 { 00195 return _sfMaskA.getValue(); 00196 }
|
|
|
Definition at line 200 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskA, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00201 { 00202 return _sfMaskA.getValue(); 00203 }
|
|
|
Definition at line 144 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskR, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 165 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskG, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 186 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskB, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
Definition at line 207 of file OSGColorMaskChunkBase.inl. References osg::ColorMaskChunkBase::_sfMaskA, and osg::SField< FieldTypeT, fieldNameSpace >::setValue().
|
|
|
||||||||||||
|
||||||||||||
|
|
Reimplemented from osg::Attachment. Definition at line 72 of file OSGColorMaskChunkBase.inl. References osg::AttachmentPtr::dcast(), osg::ColorMaskChunkBase::getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and osg::ColorMaskChunkBase::shallowCopy(). 00073 { 00074 ColorMaskChunkPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = ColorMaskChunkPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|