#include <OSGStateChunk.h>
Inheritance diagram for osg::StateChunk:

General Fieldcontainer Declaration | |
| virtual osg::FieldContainerPtr | shallowCopy (void) const |
| static AttachmentPtr | create (void) |
| static AttachmentPtr | createEmpty (void) |
Public Types | |
| typedef StateChunkPtr | Ptr |
| enum | { ParentsFieldId = Inherited::NextFieldId, InternalFieldId = ParentsFieldId + 1, NextFieldId = InternalFieldId + 1 } |
Public Member Functions | |
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 |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Binary Access | |
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
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 | |
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 | |
Get Class Type Information | |
| static UInt16 | getClassGroupId (void) |
Static Public Attributes | |
| 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 | |
Constructors | |
| * | StateChunk (void) |
| StateChunk (const StateChunk &source) | |
Destructors | |
| *virtual | ~StateChunk (void) |
Sync | |
| *void | executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, 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) |
Protected Attributes | |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Member | |
| *UInt32 | _shares |
Static Protected Attributes | |
Type information | |
| *static FieldDescription * | _desc [] |
Private Types | |
| typedef StateChunkBase | Inherited |
Private Member Functions | |
| void | operator= (const StateChunk &source) |
Static Private Attributes | |
| static char | cvsid [] = "@(#)$Id: $" |
Friends | |
| class | FieldContainer |
| class | StateChunkBase |
Definition at line 104 of file OSGStateChunk.h.
|
|
|
|
Reimplemented from osg::FieldContainer. Definition at line 86 of file OSGAttachmentImpl.h. 00087 { 00088 ParentsFieldId = Inherited::NextFieldId, 00089 InternalFieldId = ParentsFieldId + 1, 00090 NextFieldId = InternalFieldId + 1 00091 };
|
|
|
Definition at line 207 of file OSGStateChunk.cpp. 00207 : 00208 Inherited() 00209 { 00210 }
|
|
|
Definition at line 212 of file OSGStateChunk.cpp. 00212 : 00213 Inherited(source) 00214 { 00215 }
|
|
|
Definition at line 217 of file OSGStateChunk.cpp.
|
|
|
Definition at line 48 of file OSGStateChunk.inl. References getClass(), and osg::StateChunkClass::getId(). 00049 { 00050 return getClass()->getId(); 00051 }
|
|
|
|
Reimplemented in osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::FragmentProgramChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, and osg::VertexProgramChunk. Definition at line 56 of file OSGStateChunk.inl. References osg::StateChunkClass::getId(), and getStaticClass(). 00057 { 00058 return StateChunk::getStaticClass()->getId(); 00059 }
|
|
|
Reimplemented in osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::FragmentProgramChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, and osg::VertexProgramChunk. Definition at line 62 of file OSGStateChunk.inl. Referenced by getStaticClassId().
|
|
||||||||||||
|
||||||||||||
|
Reimplemented from osg::Attachment. Reimplemented in osg::FatBorderChunk, osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::FragmentProgramChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, osg::VertexProgramChunk, osg::ShaderChunk, osg::ShaderParameterChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 229 of file OSGStateChunk.cpp. References SLOG. Referenced by osg::PolygonChunk::dump(). 00231 { 00232 SLOG << "Dump StateChunk NI" << std::endl; 00233 }
|
|
||||||||||||
|
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 in osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 242 of file OSGStateChunk.cpp. References FWARNING. Referenced by changeFrom(). 00244 { 00245 FWARNING(("StateChunk::activate called!\n")); 00246 }
|
|
||||||||||||||||
|
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 in osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 253 of file OSGStateChunk.cpp. References activate(), and deactivate(). 00256 { 00257 old->deactivate(action, index); 00258 activate(action, index); 00259 }
|
|
||||||||||||
|
|
Check if the chunk is transparent, i.e. needs to be rendered after the opaque objects. Reimplemented in osg::BlendChunk, osg::MaterialChunk, osg::PointChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, and osg::TextureChunk. Definition at line 275 of file OSGStateChunk.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 in osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 293 of file OSGStateChunk.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 in osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 298 of file OSGStateChunk.cpp.
|
|
|
Compare two chunks. In most cases not implemented yet, will return false. Reimplemented in osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 306 of file OSGStateChunk.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 in osg::BlendChunk, osg::ClipPlaneChunk, osg::ColorMaskChunk, osg::CubeTextureChunk, osg::DepthChunk, osg::LightChunk, osg::LineChunk, osg::MaterialChunk, osg::PointChunk, osg::PolygonChunk, osg::ProgramChunk, osg::RegisterCombinersChunk, osg::StencilChunk, osg::TexGenChunk, osg::TextureChunk, osg::TextureTransformChunk, osg::TransformChunk, osg::TwoSidedLightingChunk, osg::SHLChunk, and osg::SHLParameterChunk. Definition at line 311 of file OSGStateChunk.cpp.
|
|
|
|
|
|
|
Reimplemented from osg::Attachment. Reimplemented in osg::FatBorderChunkBase, osg::BlendChunkBase, osg::ClipPlaneChunkBase, osg::ColorMaskChunkBase, osg::CubeTextureChunkBase, osg::DepthChunkBase, osg::FragmentProgramChunkBase, osg::LightChunkBase, osg::LineChunkBase, osg::MaterialChunkBase, osg::PointChunkBase, osg::PolygonChunkBase, osg::ProgramChunkBase, osg::RegisterCombinersChunkBase, osg::StencilChunkBase, osg::TexGenChunkBase, osg::TextureChunkBase, osg::TextureTransformChunkBase, osg::TransformChunkBase, osg::TwoSidedLightingChunkBase, osg::VertexProgramChunkBase, osg::ShaderChunkBase, osg::ShaderParameterChunkBase, osg::SHLChunkBase, and osg::SHLParameterChunkBase. Definition at line 58 of file OSGStateChunkBase.inl. References osg::StateChunkBase::_type. 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::Attachment. Reimplemented in osg::FatBorderChunkBase, osg::BlendChunkBase, osg::ClipPlaneChunkBase, osg::ColorMaskChunkBase, osg::CubeTextureChunkBase, osg::DepthChunkBase, osg::FragmentProgramChunkBase, osg::LightChunkBase, osg::LineChunkBase, osg::MaterialChunkBase, osg::PointChunkBase, osg::PolygonChunkBase, osg::ProgramChunkBase, osg::RegisterCombinersChunkBase, osg::StencilChunkBase, osg::TexGenChunkBase, osg::TextureChunkBase, osg::TextureTransformChunkBase, osg::TransformChunkBase, osg::TwoSidedLightingChunkBase, osg::VertexProgramChunkBase, osg::ShaderChunkBase, osg::ShaderParameterChunkBase, osg::SHLChunkBase, and osg::SHLParameterChunkBase. Definition at line 65 of file OSGStateChunkBase.inl. References osg::StateChunkBase::_type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::Attachment. Reimplemented in osg::FatBorderChunkBase, osg::BlendChunkBase, osg::ClipPlaneChunkBase, osg::ColorMaskChunkBase, osg::CubeTextureChunkBase, osg::DepthChunkBase, osg::FragmentProgramChunkBase, osg::LightChunkBase, osg::LineChunkBase, osg::MaterialChunkBase, osg::PointChunkBase, osg::PolygonChunkBase, osg::ProgramChunkBase, osg::RegisterCombinersChunkBase, osg::StencilChunkBase, osg::TexGenChunkBase, osg::TextureChunkBase, osg::TextureTransformChunkBase, osg::TransformChunkBase, osg::TwoSidedLightingChunkBase, osg::VertexProgramChunkBase, osg::ShaderChunkBase, osg::ShaderParameterChunkBase, osg::SHLChunkBase, and osg::SHLParameterChunkBase. Definition at line 86 of file OSGStateChunkBase.cpp. References osg::StateChunkBase::_type. 00087 { 00088 return _type; 00089 }
|
|
|
Reimplemented from osg::Attachment. Reimplemented in osg::FatBorderChunkBase, osg::BlendChunkBase, osg::ClipPlaneChunkBase, osg::ColorMaskChunkBase, osg::CubeTextureChunkBase, osg::DepthChunkBase, osg::FragmentProgramChunkBase, osg::LightChunkBase, osg::LineChunkBase, osg::MaterialChunkBase, osg::PointChunkBase, osg::PolygonChunkBase, osg::ProgramChunkBase, osg::RegisterCombinersChunkBase, osg::StencilChunkBase, osg::TexGenChunkBase, osg::TextureChunkBase, osg::TextureTransformChunkBase, osg::TransformChunkBase, osg::TwoSidedLightingChunkBase, osg::VertexProgramChunkBase, osg::ShaderChunkBase, osg::ShaderParameterChunkBase, osg::SHLChunkBase, and osg::SHLParameterChunkBase. Definition at line 91 of file OSGStateChunkBase.cpp. References osg::StateChunkBase::_type. 00092 { 00093 return _type; 00094 }
|
|