#include <OSGMultiPassMaterialBase.h>
Inheritance diagram for osg::MultiPassMaterialBase:

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 MultiPassMaterialPtr | Ptr |
| enum | { MaterialsFieldId = Inherited::NextFieldId, NextFieldId = MaterialsFieldId + 1 } |
Public Member Functions | |
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. | |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *MFMaterialPtr * | getMFMaterials (void) |
| Get the MultiPassMaterial::_mfMaterials field. | |
| MaterialPtr & | getMaterials (const UInt32 index) |
| Get the value of the index element the MultiPassMaterial::_mfMaterials field. | |
| MFMaterialPtr & | getMaterials (void) |
| Get the MultiPassMaterial::_mfMaterials field. | |
| const MFMaterialPtr & | getMaterials (void) const |
| Get the MultiPassMaterial::_mfMaterials 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 MultiPassMaterialPtr | create (void) |
| create a new instance of the class | |
| static MultiPassMaterialPtr | 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 | MaterialsFieldMask |
| 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 | |
| * | MultiPassMaterialBase (void) |
| MultiPassMaterialBase (const MultiPassMaterialBase &source) | |
Destructors | |
| *virtual | ~MultiPassMaterialBase (void) |
Sync | |
| *void | executeSyncImpl (MultiPassMaterialBase *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 | |
| *SFInt32 | _sfSortKey |
Fields | |
| *MFMaterialPtr | _mfMaterials |
Fields | |
| *SFInt32 | _sfSortKey |
Private Types | |
| typedef Material | Inherited |
Private Member Functions | |
| void | operator= (const MultiPassMaterialBase &source) |
Static Private Attributes | |
| static FieldDescription * | _desc [] |
| MultiPassMaterial description. | |
| static FieldContainerType | _type |
Friends | |
| class | FieldContainer |
Definition at line 81 of file OSGMultiPassMaterialBase.h.
|
|
Reimplemented from osg::Material. Reimplemented in osg::MultiPassMaterial. Definition at line 85 of file OSGMultiPassMaterialBase.h. |
|
|
Reimplemented from osg::MaterialBase. Definition at line 90 of file OSGMultiPassMaterialBase.h. |
|
|
Reimplemented from osg::MaterialBase. Definition at line 92 of file OSGMultiPassMaterialBase.h. 00093 { 00094 MaterialsFieldId = Inherited::NextFieldId, 00095 NextFieldId = MaterialsFieldId + 1 00096 };
|
|
|
Definition at line 165 of file OSGMultiPassMaterialBase.cpp. 00165 : 00166 _mfMaterials (), 00167 Inherited() 00168 { 00169 }
|
|
|
Definition at line 175 of file OSGMultiPassMaterialBase.cpp. 00175 : 00176 _mfMaterials (source._mfMaterials ), 00177 Inherited (source) 00178 { 00179 }
|
|
|
Definition at line 183 of file OSGMultiPassMaterialBase.cpp.
|
|
|
Reimplemented from osg::MaterialBase. Definition at line 58 of file OSGMultiPassMaterialBase.inl. References _type. Referenced by create(). 00059 { 00060 return _type; 00061 }
|
|
|
Reimplemented from osg::MaterialBase. Definition at line 65 of file OSGMultiPassMaterialBase.inl. References _type, and osg::TypeBase::getId(). 00066 { 00067 return _type.getId(); 00068 }
|
|
|
Reimplemented from osg::MaterialBase. Definition at line 106 of file OSGMultiPassMaterialBase.cpp. References _type. 00107 { 00108 return _type; 00109 }
|
|
|
Reimplemented from osg::MaterialBase. Definition at line 111 of file OSGMultiPassMaterialBase.cpp. References _type. 00112 { 00113 return _type; 00114 }
|
|
|
Reimplemented from osg::MaterialBase. Definition at line 126 of file OSGMultiPassMaterialBase.cpp. 00127 { 00128 return sizeof(MultiPassMaterial); 00129 }
|
|
|
Definition at line 101 of file OSGMultiPassMaterialBase.inl. References _mfMaterials. 00102 { 00103 return &_mfMaterials; 00104 }
|
|
|
Definition at line 110 of file OSGMultiPassMaterialBase.inl. References _mfMaterials. 00111 { 00112 return _mfMaterials[index]; 00113 }
|
|
|
Definition at line 117 of file OSGMultiPassMaterialBase.inl. References _mfMaterials. 00118 { 00119 return _mfMaterials; 00120 }
|
|
|
Definition at line 124 of file OSGMultiPassMaterialBase.inl. References _mfMaterials. 00125 { 00126 return _mfMaterials; 00127 }
|
|
|
Reimplemented from osg::MaterialBase. Definition at line 189 of file OSGMultiPassMaterialBase.cpp. References _mfMaterials, osg::MField< FieldTypeT, fieldNameSpace >::getBinSize(), osg::MaterialBase::getBinSize(), MaterialsFieldMask, and osg::FieldBits::NoField. 00190 { 00191 UInt32 returnValue = Inherited::getBinSize(whichField); 00192 00193 if(FieldBits::NoField != (MaterialsFieldMask & whichField)) 00194 { 00195 returnValue += _mfMaterials.getBinSize(); 00196 } 00197 00198 00199 return returnValue; 00200 }
|
|
||||||||||||
|
Reimplemented from osg::MaterialBase. Definition at line 202 of file OSGMultiPassMaterialBase.cpp. References _mfMaterials, osg::MField< FieldTypeT, fieldNameSpace >::copyToBin(), osg::MaterialBase::copyToBin(), MaterialsFieldMask, and osg::FieldBits::NoField. 00204 { 00205 Inherited::copyToBin(pMem, whichField); 00206 00207 if(FieldBits::NoField != (MaterialsFieldMask & whichField)) 00208 { 00209 _mfMaterials.copyToBin(pMem); 00210 } 00211 00212 00213 }
|
|
||||||||||||
|
Reimplemented from osg::MaterialBase. Definition at line 215 of file OSGMultiPassMaterialBase.cpp. References _mfMaterials, osg::MField< FieldTypeT, fieldNameSpace >::copyFromBin(), osg::MaterialBase::copyFromBin(), MaterialsFieldMask, and osg::FieldBits::NoField. 00217 { 00218 Inherited::copyFromBin(pMem, whichField); 00219 00220 if(FieldBits::NoField != (MaterialsFieldMask & whichField)) 00221 { 00222 _mfMaterials.copyFromBin(pMem); 00223 } 00224 00225 00226 }
|
|
|
Definition at line 72 of file OSGMultiPassMaterialBase.inl. References osg::AttachmentContainerPtr::dcast(), getClassType(), osg::FieldContainerType::getPrototype(), osg::NullFC, and shallowCopy(). 00073 { 00074 MultiPassMaterialPtr fc; 00075 00076 if(getClassType().getPrototype() != OSG::NullFC) 00077 { 00078 fc = MultiPassMaterialPtr::dcast( 00079 getClassType().getPrototype()-> shallowCopy()); 00080 } 00081 00082 return fc; 00083 }
|
|
|
Definition at line 87 of file OSGMultiPassMaterialBase.inl. References osg::FieldContainer::newPtr(). 00088 { 00089 MultiPassMaterialPtr returnValue; 00090 00091 newPtr(returnValue); 00092 00093 return returnValue; 00094 }
|
|
|
Implements osg::FieldContainer. Definition at line 117 of file OSGMultiPassMaterialBase.cpp. References osg::FieldContainer::newPtr(). Referenced by create(). 00118 { 00119 MultiPassMaterialPtr returnValue; 00120 00121 newPtr(returnValue, dynamic_cast<const MultiPassMaterial *>(this)); 00122 00123 return returnValue; 00124 }
|
|
||||||||||||
|
Definition at line 229 of file OSGMultiPassMaterialBase.cpp. References _mfMaterials, osg::MaterialBase::executeSyncImpl(), MaterialsFieldMask, osg::FieldBits::NoField, and osg::MField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by executeSync(). 00231 { 00232 00233 Inherited::executeSyncImpl(pOther, whichField); 00234 00235 if(FieldBits::NoField != (MaterialsFieldMask & whichField)) 00236 _mfMaterials.syncWith(pOther->_mfMaterials); 00237 00238 00239 }
|
|
||||||||||||
|
Reimplemented from osg::MaterialBase. Definition at line 133 of file OSGMultiPassMaterialBase.cpp. References executeSyncImpl(). 00135 { 00136 this->executeSyncImpl((MultiPassMaterialBase *) &other, whichField); 00137 }
|
|
|
|
|
|
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 }
|
|
|
Definition at line 97 of file OSGMaterialBase.inl. References osg::MaterialBase::_sfSortKey, and osg::SField< FieldTypeT, fieldNameSpace >::setValue(). 00098 { 00099 _sfSortKey.setValue(value); 00100 }
|
|
||||||||||||
|
Definition at line 219 of file OSGMaterialBase.cpp. References osg::MaterialBase::_sfSortKey, osg::AttachmentContainer::executeSyncImpl(), osg::FieldBits::NoField, osg::MaterialBase::SortKeyFieldMask, and osg::SField< FieldTypeT, fieldNameSpace >::syncWith(). Referenced by osg::MaterialBase::executeSync(), executeSyncImpl(), and osg::ChunkMaterialBase::executeSyncImpl(). 00221 { 00222 00223 Inherited::executeSyncImpl(pOther, whichField); 00224 00225 if(FieldBits::NoField != (SortKeyFieldMask & whichField)) 00226 _sfSortKey.syncWith(pOther->_sfSortKey); 00227 00228 00229 }
|
|
||||||||||||
|
||||||||||||
|
Definition at line 333 of file OSGFieldContainerImpl.inl. Referenced by osg::StateBase::executeSyncImpl(), osg::DVRShaderBase::executeSyncImpl(), osg::DVRClipGeometryBase::executeSyncImpl(), osg::AttachmentContainer::executeSyncImpl(), and osg::Attachment::executeSyncImpl().
|
|
||||||||||||
|
Definition at line 84 of file OSGAttachmentContainer.cpp. References osg::addRefCP(), osg::beginEditCP(), osg::endEditCP(), osg::NullFC, and osg::subRefCP(). Referenced by osg::AttachmentContainer::AttachmentContainer(), osg::Node::onCreate(), and osg::Image::setAttachmentField(). 00086 { 00087 UInt32 key; 00088 00089 if(fieldContainerP == NullFC) 00090 return; 00091 00092 key = (UInt32 (fieldContainerP->getGroupId()) << 16) | binding; 00093 00094 addRefCP(fieldContainerP); 00095 00096 beginEditCP(fieldContainerP, Attachment::ParentsFieldMask); 00097 { 00098 fieldContainerP->addParent(getPtr()); 00099 } 00100 endEditCP (fieldContainerP, Attachment::ParentsFieldMask); 00101 00102 AttachmentMap::iterator fcI = _attachmentMap.getValue().find(key); 00103 00104 if(fcI != _attachmentMap.getValue().end()) 00105 { 00106 beginEditCP((*fcI).second, Attachment::ParentsFieldMask); 00107 { 00108 (*fcI).second->subParent(getPtr()); 00109 } 00110 endEditCP ((*fcI).second, Attachment::ParentsFieldMask); 00111 00112 subRefCP((*fcI).second); 00113 00114 (*fcI).second = fieldContainerP; 00115 } 00116 else 00117 { 00118 _attachmentMap.getValue()[key] = fieldContainerP; 00119 } 00120 }
|
|
||||||||||||
|
Definition at line 122 of file OSGAttachmentContainer.cpp. References osg::AttachmentContainer::_attachmentMap, osg::beginEditCP(), osg::endEditCP(), osg::AttachmentContainer::getPtr(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::NullFC, osg::Attachment::ParentsFieldMask, and osg::subRefCP(). 00124 { 00125 UInt32 key; 00126 00127 AttachmentMap::iterator fcI; 00128 00129 if(fieldContainerP == NullFC) 00130 return; 00131 00132 key = (UInt32(fieldContainerP->getGroupId()) << 16) | binding; 00133 00134 fcI = _attachmentMap.getValue().find(key); 00135 00136 if(fcI != _attachmentMap.getValue().end()) 00137 { 00138 beginEditCP(fieldContainerP, Attachment::ParentsFieldMask); 00139 { 00140 (*fcI).second->subParent(getPtr()); 00141 } 00142 endEditCP (fieldContainerP, Attachment::ParentsFieldMask); 00143 00144 subRefCP((*fcI).second); 00145 00146 _attachmentMap.getValue().erase(fcI); 00147 } 00148 }
|
|