#include <OSGChunkMaterialBase.h>
Inheritance diagram for osg::ChunkMaterialBase:

Rendering | |
| virtual void | draw (DrawFunctor &func, DrawActionBase *action)=0 |
| virtual void | draw (Geometry *geo, DrawActionBase *action)=0 |
| virtual StatePtr | makeState (void)=0 |
| virtual void | rebuildState (void)=0 |
| StatePtr | getState (void) |
| virtual bool | isTransparent (void) const =0 |
| *typedef TypedFunctor1Base< Action::ResultE, PtrCallArg< DrawActionBase > > | DrawFunctor |
Public Types | |
| typedef ChunkMaterialPtr | Ptr |
| enum | { ChunksFieldId = Inherited::NextFieldId, SlotsFieldId = ChunksFieldId + 1, NextFieldId = SlotsFieldId + 1 } |
Public Member Functions | |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *MFStateChunkPtr * | getMFChunks (void) |
| Get the ChunkMaterial::_mfChunks field. | |
| MFInt32 * | getMFSlots (void) |
| Get the ChunkMaterial::_mfSlots field. | |
| StateChunkPtr & | getChunks (const UInt32 index) |
| Get the value of the index element the ChunkMaterial::_mfChunks field. | |
| MFStateChunkPtr & | getChunks (void) |
| Get the ChunkMaterial::_mfChunks field. | |
| const MFStateChunkPtr & | getChunks (void) const |
| Get the ChunkMaterial::_mfChunks field. | |
| Int32 & | getSlots (const UInt32 index) |
| Get the value of the index element the ChunkMaterial::_mfSlots field. | |
| MFInt32 & | getSlots (void) |
| Get the ChunkMaterial::_mfSlots field. | |
| const MFInt32 & | getSlots (void) const |
| Get the ChunkMaterial::_mfSlots 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 |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
Comparison | |
| *virtual bool | operator< (const Material &other) const |
| virtual bool | operator== (const Material &other) const |
| virtual bool | operator!= (const Material &other) const |
Field Get | |
| *SFInt32 * | getSFSortKey (void) |
| Get the Material::_sfSortKey field. | |
| Int32 & | getSortKey (void) |
| Get the value of the Material::_sfSortKey field. | |
| const Int32 & | getSortKey (void) const |
| Get the value of the Material::_sfSortKey field. | |
Field Set | |
| *void | setSortKey (const Int32 &value) |
| Set the value of the Material::_sfSortKey field. | |
Static Public Member Functions | |
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 ChunkMaterialPtr | create (void) |
| create a new instance of the class | |
| static ChunkMaterialPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Class Get | |
| *static const char * | getClassname (void) |
Static Public Attributes | |
| static const osg::BitVector | ChunksFieldMask |
| static const osg::BitVector | SlotsFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | SortKeyFieldMask |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
Constants | |
| *static const Int32 | NoStateSorting = 0x7fffffff |
Protected Member Functions | |
Constructors | |
| * | ChunkMaterialBase (void) |
| ChunkMaterialBase (const ChunkMaterialBase &source) | |
Destructors | |
| *virtual | ~ChunkMaterialBase (void) |
Sync | |
| *void | executeSyncImpl (ChunkMaterialBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (MaterialBase *pOther, const BitVector &whichField) |
Protected Attributes | |
| StatePtr | _pState |
Fields | |
| *MFStateChunkPtr | _mfChunks |
| MFInt32 | _mfSlots |
Fields | |
| *SFInt32 | _sfSortKey |
Private Types | |
| typedef Material | Inherited |
Private Member Functions | |
| void | operator= (const ChunkMaterialBase &source) |
Static Private Attributes | |
| static FieldDescription * | _desc [] |
| ChunkMaterial description. | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 82 of file OSGChunkMaterialBase.h.
|
|
Reimplemented from osg::Material. Reimplemented in osg::ChunkMaterial, osg::FresnelMaterial, osg::FresnelMaterialBase, osg::PhongMaterial, osg::PhongMaterialBase, osg::SimpleMaterial, osg::SimpleMaterialBase, osg::SimpleTexturedMaterial, osg::SimpleTexturedMaterialBase, osg::DVRAppearance, and osg::DVRAppearanceBase. Definition at line 86 of file OSGChunkMaterialBase.h. |
|
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 91 of file OSGChunkMaterialBase.h. |
|
|
Reimplemented from osg::MaterialBase. Definition at line 93 of file OSGChunkMaterialBase.h. 00094 { 00095 ChunksFieldId = Inherited::NextFieldId, 00096 SlotsFieldId = ChunksFieldId + 1, 00097 NextFieldId = SlotsFieldId + 1 00098 };
|
|
|
Definition at line 177 of file OSGChunkMaterialBase.cpp.
|
|
|
Definition at line 188 of file OSGChunkMaterialBase.cpp. 00188 : 00189 _mfChunks (source._mfChunks ), 00190 _mfSlots (source._mfSlots ), 00191 Inherited (source) 00192 { 00193 }
|
|
|
Definition at line 197 of file OSGChunkMaterialBase.cpp.
|
|
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 58 of file OSGChunkMaterialBase.inl. References _type. Referenced by create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 65 of file OSGChunkMaterialBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 117 of file OSGChunkMaterialBase.cpp. References _type. 00118 { 00119 return _type; 00120 }
|
|
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 122 of file OSGChunkMaterialBase.cpp. References _type. 00123 { 00124 return _type; 00125 }
|
|
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 137 of file OSGChunkMaterialBase.cpp. 00138 { 00139 return sizeof(ChunkMaterial); 00140 }
|
|
|
Definition at line 101 of file OSGChunkMaterialBase.inl. References _mfChunks. 00102 { 00103 return &_mfChunks; 00104 }
|
|
|
Definition at line 108 of file OSGChunkMaterialBase.inl. References _mfSlots. 00109 { 00110 return &_mfSlots; 00111 }
|
|
|
Definition at line 117 of file OSGChunkMaterialBase.inl. References _mfChunks. 00118 { 00119 return _mfChunks[index]; 00120 }
|
|
|
Definition at line 124 of file OSGChunkMaterialBase.inl. References _mfChunks. 00125 { 00126 return _mfChunks; 00127 }
|
|
|
Definition at line 131 of file OSGChunkMaterialBase.inl. References _mfChunks. 00132 { 00133 return _mfChunks; 00134 }
|
|
|
Definition at line 138 of file OSGChunkMaterialBase.inl. References _mfSlots. 00139 { 00140 return _mfSlots[index]; 00141 }
|
|
|
Definition at line 145 of file OSGChunkMaterialBase.inl. References _mfSlots. Referenced by osg::ChunkMaterial::find(). 00146 { 00147 return _mfSlots; 00148 }
|
|
|
Definition at line 152 of file OSGChunkMaterialBase.inl. References _mfSlots. 00153 { 00154 return _mfSlots; 00155 }
|
|
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 203 of file OSGChunkMaterialBase.cpp. References _mfChunks, _mfSlots, ChunksFieldMask, osg::MField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::MaterialBase::getBinSize(), osg::FieldBits::NoField, and SlotsFieldMask. Referenced by osg::SimpleMaterialBase::getBinSize(), osg::PhongMaterialBase::getBinSize(), osg::FresnelMaterialBase::getBinSize(), and osg::DVRAppearanceBase::getBinSize(). 00204 { 00205 UInt32 returnValue = Inherited::getBinSize(whichField); 00206 00207 if(FieldBits::NoField != (ChunksFieldMask & whichField)) 00208 { 00209 returnValue += _mfChunks.getBinSize(); 00210 } 00211 00212 if(FieldBits::NoField != (SlotsFieldMask & whichField)) 00213 { 00214 returnValue += _mfSlots.getBinSize(); 00215 } 00216 00217 00218 return returnValue; 00219 }
|
|
||||||||||||
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 221 of file OSGChunkMaterialBase.cpp. References _mfChunks, _mfSlots, ChunksFieldMask, osg::MField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::MaterialBase::copyToBin(), osg::FieldBits::NoField, and SlotsFieldMask. Referenced by osg::SimpleMaterialBase::copyToBin(), osg::PhongMaterialBase::copyToBin(), osg::FresnelMaterialBase::copyToBin(), and osg::DVRAppearanceBase::copyToBin(). 00223 { 00224 Inherited::copyToBin(pMem, whichField); 00225 00226 if(FieldBits::NoField != (ChunksFieldMask & whichField)) 00227 { 00228 _mfChunks.copyToBin(pMem); 00229 } 00230 00231 if(FieldBits::NoField != (SlotsFieldMask & whichField)) 00232 { 00233 _mfSlots.copyToBin(pMem); 00234 } 00235 00236 00237 }
|
|
||||||||||||
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 239 of file OSGChunkMaterialBase.cpp. References _mfChunks, _mfSlots, ChunksFieldMask, osg::MField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::MaterialBase::copyFromBin(), osg::FieldBits::NoField, and SlotsFieldMask. Referenced by osg::SimpleMaterialBase::copyFromBin(), osg::PhongMaterialBase::copyFromBin(), osg::FresnelMaterialBase::copyFromBin(), and osg::DVRAppearanceBase::copyFromBin(). 00241 { 00242 Inherited::copyFromBin(pMem, whichField); 00243 00244 if(FieldBits::NoField != (ChunksFieldMask & whichField)) 00245 { 00246 _mfChunks.copyFromBin(pMem); 00247 } 00248 00249 if(FieldBits::NoField != (SlotsFieldMask & whichField)) 00250 { 00251 _mfSlots.copyFromBin(pMem); 00252 } 00253 00254 00255 }
|
|
|
Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 72 of file OSGChunkMaterialBase.inl. References osg::AttachmentContainerPtr::dcast(), getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy(). Referenced by osg::PhongMaterial::createChunkMaterial(), osg::DisplayCalibration::createCMViewports(), osg::VRMLMaterialDesc::endProtoInterface(), and osg::VRMLAppearanceDesc::init(). 00073 { 00074 ChunkMaterialPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = ChunkMaterialPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 87 of file OSGChunkMaterialBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 ChunkMaterialPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Implements osg::FieldContainer. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 128 of file OSGChunkMaterialBase.cpp. References osg::FieldContainer::newPtr(). Referenced by create(). 00129 { 00130 ChunkMaterialPtr returnValue; 00131 00132 newPtr(returnValue, dynamic_cast<const ChunkMaterial *>(this)); 00133 00134 return returnValue; 00135 }
|
|
||||||||||||
|
Definition at line 258 of file OSGChunkMaterialBase.cpp. References _mfChunks, _mfSlots, ChunksFieldMask, osg::MaterialBase::executeSyncImpl(), osg::FieldBits::NoField, SlotsFieldMask, and osg::MField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by executeSync(), osg::SimpleMaterialBase::executeSyncImpl(), osg::PhongMaterialBase::executeSyncImpl(), osg::FresnelMaterialBase::executeSyncImpl(), and osg::DVRAppearanceBase::executeSyncImpl(). 00260 { 00261 00262 Inherited::executeSyncImpl(pOther, whichField); 00263 00264 if(FieldBits::NoField != (ChunksFieldMask & whichField)) 00265 _mfChunks.syncWith(pOther->_mfChunks); 00266 00267 if(FieldBits::NoField != (SlotsFieldMask & whichField)) 00268 _mfSlots.syncWith(pOther->_mfSlots); 00269 00270 00271 }
|
|
||||||||||||
|
Reimplemented from osg::MaterialBase. Reimplemented in osg::FresnelMaterialBase, osg::PhongMaterialBase, osg::SimpleMaterialBase, osg::SimpleTexturedMaterialBase, and osg::DVRAppearanceBase. Definition at line 144 of file OSGChunkMaterialBase.cpp. References executeSyncImpl(). 00146 { 00147 this->executeSyncImpl((ChunkMaterialBase *) &other, whichField); 00148 }
|
|
|
|
|
|
Reimplemented in osg::ChunkMaterial, and osg::SimpleMaterial. Definition at line 71 of file OSGMaterial.h.
|
|
||||||||||||
|
Reimplemented from osg::AttachmentContainer. Reimplemented in osg::ChunkMaterial, osg::FresnelMaterial, osg::MultiPassMaterial, osg::PhongMaterial, osg::SimpleMaterial, osg::SimpleTexturedMaterial, and osg::DVRAppearance. Definition at line 157 of file OSGMaterial.cpp. References osg::AttachmentContainer::changed(), and osg::Material::rebuildState(). Referenced by osg::MultiPassMaterial::changed(), and osg::ChunkMaterial::changed(). 00158 { 00159 Inherited::changed(whichField, origin); 00160 00161 rebuildState(); 00162 }
|
|
||||||||||||
|
Reimplemented from osg::AttachmentContainer. Reimplemented in osg::ChunkMaterial, osg::FresnelMaterial, osg::MultiPassMaterial, osg::PhongMaterial, osg::SimpleMaterial, osg::SimpleTexturedMaterial, and osg::DVRAppearance. Definition at line 166 of file OSGMaterial.cpp. References SLOG. 00168 { 00169 SLOG << "Material::dump called: NIY!" << std::endl; 00170 // Inherited::dump(uiIndent, bvFlags); 00171 }
|
|
||||||||||||
|
Implemented in osg::ChunkMaterial, and osg::MultiPassMaterial. Referenced by osg::DVRVolume::doDraw(), and osg::MaterialDrawable::drawActionHandler(). |
|
||||||||||||
|
Implemented in osg::ChunkMaterial, and osg::MultiPassMaterial. |
|
|
Creates an instance of a osg::State that is used to represent the material. This is used by the osg::DrawAction. Implemented in osg::ChunkMaterial, osg::FresnelMaterial, osg::MultiPassMaterial, osg::PhongMaterial, osg::SimpleMaterial, and osg::SimpleTexturedMaterial. |
|
|
Update the internal osg::State. Implemented in osg::ChunkMaterial, osg::FresnelMaterial, osg::MultiPassMaterial, osg::PhongMaterial, osg::SimpleMaterial, and osg::SimpleTexturedMaterial. Referenced by osg::Material::changed(), osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry(). |
|
|
Access the internal osg::State, used by the osg::RenderAction. Definition at line 152 of file OSGMaterial.cpp. References osg::Material::_pState. Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry(). 00153 { 00154 return _pState; 00155 }
|
|
|
Check if the Material is transparent and thus has to be rendered afte the opaque ones. Implemented in osg::ChunkMaterial, osg::FresnelMaterial, osg::MultiPassMaterial, osg::PhongMaterial, osg::SimpleMaterial, and osg::SimpleTexturedMaterial. Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry(). |
|
|
Definition at line 175 of file OSGMaterial.cpp.
|
|
|
Definition at line 180 of file OSGMaterial.cpp. References osg::Material::_pState.
|
|
|
Definition at line 185 of file OSGMaterial.cpp.
|
|
|
Definition at line 75 of file OSGMaterialBase.inl. References osg::MaterialBase::_sfSortKey. 00076 { 00077 return &_sfSortKey; 00078 }
|
|
|
Definition at line 83 of file OSGMaterialBase.inl. References osg::MaterialBase::_sfSortKey, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). Referenced by osg::RenderAction::dropFunctor(), and osg::RenderAction::dropGeometry(). 00084 { 00085 return _sfSortKey.getValue(); 00086 }
|
|
|
Definition at line 90 of file OSGMaterialBase.inl. References osg::MaterialBase::_sfSortKey, and osg::SField< FieldTypeT, fieldNameSpace >::getValue(). 00091 { 00092 return _sfSortKey.getValue(); 00093 }
|
|
|
|