#include <OSGMaterialChunkBase.h>
Inheritance diagram for osg::MaterialChunkBase:

Public Types | |
| typedef MaterialChunkPtr | Ptr |
| enum | { DiffuseFieldId = Inherited::NextFieldId, AmbientFieldId = DiffuseFieldId + 1, SpecularFieldId = AmbientFieldId + 1, EmissionFieldId = SpecularFieldId + 1, ShininessFieldId = EmissionFieldId + 1, LitFieldId = ShininessFieldId + 1, ColorMaterialFieldId = LitFieldId + 1, BackMaterialFieldId = ColorMaterialFieldId + 1, BackDiffuseFieldId = BackMaterialFieldId + 1, BackAmbientFieldId = BackDiffuseFieldId + 1, BackSpecularFieldId = BackAmbientFieldId + 1, BackEmissionFieldId = BackSpecularFieldId + 1, BackShininessFieldId = BackEmissionFieldId + 1, BackColorMaterialFieldId = BackShininessFieldId + 1, NextFieldId = BackColorMaterialFieldId + 1 } |
Public Member Functions | |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFColor4f * | getSFDiffuse (void) |
| Get the MaterialChunk::_sfDiffuse field. | |
| SFColor4f * | getSFAmbient (void) |
| Get the MaterialChunk::_sfAmbient field. | |
| SFColor4f * | getSFSpecular (void) |
| Get the MaterialChunk::_sfSpecular field. | |
| SFColor4f * | getSFEmission (void) |
| Get the MaterialChunk::_sfEmission field. | |
| SFReal32 * | getSFShininess (void) |
| Get the MaterialChunk::_sfShininess field. | |
| SFBool * | getSFLit (void) |
| Get the MaterialChunk::_sfLit field. | |
| SFGLenum * | getSFColorMaterial (void) |
| Get the MaterialChunk::_sfColorMaterial field. | |
| SFBool * | getSFBackMaterial (void) |
| Get the MaterialChunk::_sfBackMaterial field. | |
| SFColor4f * | getSFBackDiffuse (void) |
| Get the MaterialChunk::_sfBackDiffuse field. | |
| SFColor4f * | getSFBackAmbient (void) |
| Get the MaterialChunk::_sfBackAmbient field. | |
| SFColor4f * | getSFBackSpecular (void) |
| Get the MaterialChunk::_sfBackSpecular field. | |
| SFColor4f * | getSFBackEmission (void) |
| Get the MaterialChunk::_sfBackEmission field. | |
| SFReal32 * | getSFBackShininess (void) |
| Get the MaterialChunk::_sfBackShininess field. | |
| SFGLenum * | getSFBackColorMaterial (void) |
| Get the MaterialChunk::_sfBackColorMaterial field. | |
| Color4f & | getDiffuse (void) |
| Get the value of the MaterialChunk::_sfDiffuse field. | |
| const Color4f & | getDiffuse (void) const |
| Get the value of the MaterialChunk::_sfDiffuse field. | |
| Color4f & | getAmbient (void) |
| Get the value of the MaterialChunk::_sfAmbient field. | |
| const Color4f & | getAmbient (void) const |
| Get the value of the MaterialChunk::_sfAmbient field. | |
| Color4f & | getSpecular (void) |
| Get the value of the MaterialChunk::_sfSpecular field. | |
| const Color4f & | getSpecular (void) const |
| Get the value of the MaterialChunk::_sfSpecular field. | |
| Color4f & | getEmission (void) |
| Get the value of the MaterialChunk::_sfEmission field. | |
| const Color4f & | getEmission (void) const |
| Get the value of the MaterialChunk::_sfEmission field. | |
| Real32 & | getShininess (void) |
| Get the value of the MaterialChunk::_sfShininess field. | |
| const Real32 & | getShininess (void) const |
| Get the value of the MaterialChunk::_sfShininess field. | |
| bool & | getLit (void) |
| Get the value of the MaterialChunk::_sfLit field. | |
| const bool & | getLit (void) const |
| Get the value of the MaterialChunk::_sfLit field. | |
| GLenum & | getColorMaterial (void) |
| Get the value of the MaterialChunk::_sfColorMaterial field. | |
| const GLenum & | getColorMaterial (void) const |
| Get the value of the MaterialChunk::_sfColorMaterial field. | |
| bool & | getBackMaterial (void) |
| Get the value of the MaterialChunk::_sfBackMaterial field. | |
| const bool & | getBackMaterial (void) const |
| Get the value of the MaterialChunk::_sfBackMaterial field. | |
| Color4f & | getBackDiffuse (void) |
| Get the value of the MaterialChunk::_sfBackDiffuse field. | |
| const Color4f & | getBackDiffuse (void) const |
| Get the value of the MaterialChunk::_sfBackDiffuse field. | |
| Color4f & | getBackAmbient (void) |
| Get the value of the MaterialChunk::_sfBackAmbient field. | |
| const Color4f & | getBackAmbient (void) const |
| Get the value of the MaterialChunk::_sfBackAmbient field. | |
| Color4f & | getBackSpecular (void) |
| Get the value of the MaterialChunk::_sfBackSpecular field. | |
| const Color4f & | getBackSpecular (void) const |
| Get the value of the MaterialChunk::_sfBackSpecular field. | |
| Color4f & | getBackEmission (void) |
| Get the value of the MaterialChunk::_sfBackEmission field. | |
| const Color4f & | getBackEmission (void) const |
| Get the value of the MaterialChunk::_sfBackEmission field. | |
| Real32 & | getBackShininess (void) |
| Get the value of the MaterialChunk::_sfBackShininess field. | |
| const Real32 & | getBackShininess (void) const |
| Get the value of the MaterialChunk::_sfBackShininess field. | |
| GLenum & | getBackColorMaterial (void) |
| Get the value of the MaterialChunk::_sfBackColorMaterial field. | |
| const GLenum & | getBackColorMaterial (void) const |
| Get the value of the MaterialChunk::_sfBackColorMaterial field. | |
Field Set | |
| *void | setDiffuse (const Color4f &value) |
| Set the value of the MaterialChunk::_sfDiffuse field. | |
| void | setAmbient (const Color4f &value) |
| Set the value of the MaterialChunk::_sfAmbient field. | |
| void | setSpecular (const Color4f &value) |
| Set the value of the MaterialChunk::_sfSpecular field. | |
| void | setEmission (const Color4f &value) |
| Set the value of the MaterialChunk::_sfEmission field. | |
| void | setShininess (const Real32 &value) |
| Set the value of the MaterialChunk::_sfShininess field. | |
| void | setLit (const bool &value) |
| Set the value of the MaterialChunk::_sfLit field. | |
| void | setColorMaterial (const GLenum &value) |
| Set the value of the MaterialChunk::_sfColorMaterial field. | |
| void | setBackMaterial (const bool &value) |
| Set the value of the MaterialChunk::_sfBackMaterial field. | |
| void | setBackDiffuse (const Color4f &value) |
| Set the value of the MaterialChunk::_sfBackDiffuse field. | |
| void | setBackAmbient (const Color4f &value) |
| Set the value of the MaterialChunk::_sfBackAmbient field. | |
| void | setBackSpecular (const Color4f &value) |
| Set the value of the MaterialChunk::_sfBackSpecular field. | |
| void | setBackEmission (const Color4f &value) |
| Set the value of the MaterialChunk::_sfBackEmission field. | |
| void | setBackShininess (const Real32 &value) |
| Set the value of the MaterialChunk::_sfBackShininess field. | |
| void | setBackColorMaterial (const GLenum &value) |
| Set the value of the MaterialChunk::_sfBackColorMaterial 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 |
Chunk Class Access | |
| *UInt32 | getClassId (void) const |
| 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 | |
| *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) |
| virtual bool | isTransparent (void) const |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| virtual bool | operator== (const StateChunk &other) const |
| virtual bool | operator!= (const StateChunk &other) const |
Parents | |
| *MFFieldContainerPtr & | getParents (void) |
| const MFFieldContainerPtr & | getParents (void) const |
| MFFieldContainerPtr * | getMFParents (void) |
| void | addParent (FieldContainerPtr parent) |
| void | subParent (FieldContainerPtr parent) |
| Int32 | findParent (FieldContainerPtr parent) |
Parents | |
| *SFBool & | getInternal (void) |
| const SFBool & | getInternal (void) const |
| SFBool * | getSFInternal (void) |
| void | setInternal (bool bVal) |
Get Instance Type Information | |
| UInt32 | getTypeId (void) const |
| UInt16 | getGroupId (void) const |
| const Char8 * | getTypeName (void) const |
| Generic Field Access *Field * | getField (UInt32 fieldId) |
| Field * | getField (const Char8 *fieldName) |
Static Public Member Functions | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (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 MaterialChunkPtr | create (void) |
| create a new instance of the class | |
| static MaterialChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Chunk Class Access | |
| *static UInt32 | getStaticClassId (void) |
| static const StateChunkClass * | getStaticClass (void) |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Static Public Attributes | |
| static const osg::BitVector | DiffuseFieldMask |
| static const osg::BitVector | AmbientFieldMask |
| static const osg::BitVector | SpecularFieldMask |
| static const osg::BitVector | EmissionFieldMask |
| static const osg::BitVector | ShininessFieldMask |
| static const osg::BitVector | LitFieldMask |
| static const osg::BitVector | ColorMaterialFieldMask |
| static const osg::BitVector | BackMaterialFieldMask |
| static const osg::BitVector | BackDiffuseFieldMask |
| static const osg::BitVector | BackAmbientFieldMask |
| static const osg::BitVector | BackSpecularFieldMask |
| static const osg::BitVector | BackEmissionFieldMask |
| static const osg::BitVector | BackShininessFieldMask |
| static const osg::BitVector | BackColorMaterialFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
Protected Member Functions | |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
Constructors | |
| * | MaterialChunkBase (void) |
| MaterialChunkBase (const MaterialChunkBase &source) | |
Destructors | |
| *virtual | ~MaterialChunkBase (void) |
Sync | |
| *void | executeSyncImpl (MaterialChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (FieldContainer *pOther, const BitVector &whichField) |
MT Destruction | |
| *virtual void | onDestroy (void) |
MT Edit | |
| template<class FieldTypeT> | |
| *void | beginEditX (const BitVector &whichField, FieldTypeT &field) |
| template<class FieldTypeT> | |
| void | endEditX (const BitVector &whichField, FieldTypeT &field) |
MT Construction | |
| *void | onCreate (const FieldContainer *source=NULL) |
| void | onCreateAspect (const FieldContainer *aspect0, const FieldContainer *source=NULL) |
Static Protected Member Functions | |
| static void | initMethod (void) |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Create Fieldcontainer | |
| template<class ObjectPtrT> | |
| *static void | newPtr (ObjectPtrT &result, const typename ObjectPtrT::StoredObjectType *prototypeP) |
| template<class ObjectPtrT> | |
| static void | newPtr (ObjectPtrT &result) |
Protected Attributes | |
Member | |
| *UInt32 | _shares |
Fields | |
| *SFColor4f | _sfDiffuse |
| SFColor4f | _sfAmbient |
| SFColor4f | _sfSpecular |
| SFColor4f | _sfEmission |
| SFReal32 | _sfShininess |
| SFBool | _sfLit |
| SFGLenum | _sfColorMaterial |
| SFBool | _sfBackMaterial |
| SFColor4f | _sfBackDiffuse |
| SFColor4f | _sfBackAmbient |
| SFColor4f | _sfBackSpecular |
| SFColor4f | _sfBackEmission |
| SFReal32 | _sfBackShininess |
| SFGLenum | _sfBackColorMaterial |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Member | |
| *UInt32 | _shares |
Private Types | |
| typedef StateChunk | Inherited |
Private Member Functions | |
| void | operator= (const MaterialChunkBase &source) |
Static Private Attributes | |
| static FieldDescription * | _desc [] |
| MaterialChunk description. | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 94 of file OSGMaterialChunkBase.h.
|
|
Reimplemented from osg::StateChunk. Reimplemented in osg::MaterialChunk. Definition at line 98 of file OSGMaterialChunkBase.h. |
|
|
Reimplemented from osg::StateChunkBase. Definition at line 103 of file OSGMaterialChunkBase.h. |
|
|
Reimplemented from osg::Attachment. Definition at line 105 of file OSGMaterialChunkBase.h. 00106 { 00107 DiffuseFieldId = Inherited::NextFieldId, 00108 AmbientFieldId = DiffuseFieldId + 1, 00109 SpecularFieldId = AmbientFieldId + 1, 00110 EmissionFieldId = SpecularFieldId + 1, 00111 ShininessFieldId = EmissionFieldId + 1, 00112 LitFieldId = ShininessFieldId + 1, 00113 ColorMaterialFieldId = LitFieldId + 1, 00114 BackMaterialFieldId = ColorMaterialFieldId + 1, 00115 BackDiffuseFieldId = BackMaterialFieldId + 1, 00116 BackAmbientFieldId = BackDiffuseFieldId + 1, 00117 BackSpecularFieldId = BackAmbientFieldId + 1, 00118 BackEmissionFieldId = BackSpecularFieldId + 1, 00119 BackShininessFieldId = BackEmissionFieldId + 1, 00120 BackColorMaterialFieldId = BackShininessFieldId + 1, 00121 NextFieldId = BackColorMaterialFieldId + 1 00122 };
|
|
|
Definition at line 309 of file OSGMaterialChunkBase.cpp. 00309 : 00310 _sfDiffuse (Color4f(1,1,1,1)), 00311 _sfAmbient (Color4f(.2,.2,.2,1)), 00312 _sfSpecular (Color4f(.5,.5,.5,1)), 00313 _sfEmission (Color4f(0,0,0,1)), 00314 _sfShininess (Real32(10)), 00315 _sfLit (bool(true)), 00316 _sfColorMaterial (GLenum(GL_DIFFUSE)), 00317 _sfBackMaterial (bool(false)), 00318 _sfBackDiffuse (Color4f(1,1,1,0)), 00319 _sfBackAmbient (Color4f(.2,.2,.2,0)), 00320 _sfBackSpecular (Color4f(.5,.5,.5,0)), 00321 _sfBackEmission (Color4f(0,0,0,0)), 00322 _sfBackShininess (Real32(10)), 00323 _sfBackColorMaterial (GLenum(GL_DIFFUSE)), 00324 Inherited() 00325 { 00326 }
|
|
|
Definition at line 332 of file OSGMaterialChunkBase.cpp. 00332 : 00333 _sfDiffuse (source._sfDiffuse ), 00334 _sfAmbient (source._sfAmbient ), 00335 _sfSpecular (source._sfSpecular ), 00336 _sfEmission (source._sfEmission ), 00337 _sfShininess (source._sfShininess ), 00338 _sfLit (source._sfLit ), 00339 _sfColorMaterial (source._sfColorMaterial ), 00340 _sfBackMaterial (source._sfBackMaterial ), 00341 _sfBackDiffuse (source._sfBackDiffuse ), 00342 _sfBackAmbient (source._sfBackAmbient ), 00343 _sfBackSpecular (source._sfBackSpecular ), 00344 _sfBackEmission (source._sfBackEmission ), 00345 _sfBackShininess (source._sfBackShininess ), 00346 _sfBackColorMaterial (source._sfBackColorMaterial ), 00347 Inherited (source) 00348 { 00349 }
|
|
|
Definition at line 353 of file OSGMaterialChunkBase.cpp.
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 58 of file OSGMaterialChunkBase.inl. References _type. Referenced by create(), and modifyMaterial(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 65 of file OSGMaterialChunkBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 251 of file OSGMaterialChunkBase.cpp. References _type. 00252 { 00253 return _type; 00254 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 256 of file OSGMaterialChunkBase.cpp. References _type. 00257 { 00258 return _type; 00259 }
|
|
|
Reimplemented from osg::StateChunkBase. Definition at line 271 of file OSGMaterialChunkBase.cpp. 00272 { 00273 return sizeof(MaterialChunk); 00274 }
|
|
|
Definition at line 101 of file OSGMaterialChunkBase.inl. References _sfDiffuse. 00102 { 00103 return &_sfDiffuse; 00104 }
|
|
|
Definition at line 108 of file OSGMaterialChunkBase.inl. References _sfAmbient. 00109 { 00110 return &_sfAmbient; 00111 }
|
|
|
Definition at line 115 of file OSGMaterialChunkBase.inl. References _sfSpecular. 00116 { 00117 return &_sfSpecular; 00118 }
|
|
|
Definition at line 122 of file OSGMaterialChunkBase.inl. References _sfEmission. 00123 { 00124 return &_sfEmission; 00125 }
|
|
|
Definition at line 129 of file OSGMaterialChunkBase.inl. References _sfShininess. 00130 { 00131 return &_sfShininess; 00132 }
|
|
|
Definition at line 136 of file OSGMaterialChunkBase.inl. References _sfLit. 00137 { 00138 return &_sfLit; 00139 }
|
|
|
Definition at line 143 of file OSGMaterialChunkBase.inl. References _sfColorMaterial. 00144 { 00145 return &_sfColorMaterial; 00146 }
|
|
|
Definition at line 150 of file OSGMaterialChunkBase.inl. References _sfBackMaterial. 00151 { 00152 return &_sfBackMaterial; 00153 }
|
|
|
Definition at line 157 of file OSGMaterialChunkBase.inl. References _sfBackDiffuse. 00158 { 00159 return &_sfBackDiffuse; 00160 }
|
|
|
Definition at line 164 of file OSGMaterialChunkBase.inl. References _sfBackAmbient. 00165 { 00166 return &_sfBackAmbient; 00167 }
|
|
|
Definition at line 171 of file OSGMaterialChunkBase.inl. References _sfBackSpecular. 00172 { 00173 return &_sfBackSpecular; 00174 }
|
|
|
Definition at line 178 of file OSGMaterialChunkBase.inl. References _sfBackEmission. 00179 { 00180 return &_sfBackEmission; 00181 }
|