#include <OSGFresnelMaterial.h>
Inheritance diagram for osg::FresnelMaterial:

Rendering | |
| StatePtr | getState (void) |
| *typedef TypedFunctor1Base< Action::ResultE, PtrCallArg< DrawActionBase > > | DrawFunctor |
Public Types | |
| typedef FresnelMaterialPtr | Ptr |
| enum | { AmbientFieldId = Inherited::NextFieldId, DiffuseFieldId = AmbientFieldId + 1, SpecularFieldId = DiffuseFieldId + 1, ShininessFieldId = SpecularFieldId + 1, EmissionFieldId = ShininessFieldId + 1, TransparencyFieldId = EmissionFieldId + 1, LitFieldId = TransparencyFieldId + 1, ColorMaterialFieldId = LitFieldId + 1, IndexFieldId = ColorMaterialFieldId + 1, ScaleFieldId = IndexFieldId + 1, BiasFieldId = ScaleFieldId + 1, ImageFieldId = BiasFieldId + 1, NextFieldId = ImageFieldId + 1 } |
Public Member Functions | |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
| virtual StatePtr | makeState (void) |
| virtual void | rebuildState (void) |
| virtual bool | isTransparent (void) const |
Texture specific | |
| *void | setImage (ImagePtr &pImage) |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFColor3f * | getSFAmbient (void) |
| Get the FresnelMaterial::_sfAmbient field. | |
| SFColor3f * | getSFDiffuse (void) |
| Get the FresnelMaterial::_sfDiffuse field. | |
| SFColor3f * | getSFSpecular (void) |
| Get the FresnelMaterial::_sfSpecular field. | |
| SFReal32 * | getSFShininess (void) |
| Get the FresnelMaterial::_sfShininess field. | |
| SFColor3f * | getSFEmission (void) |
| Get the FresnelMaterial::_sfEmission field. | |
| SFReal32 * | getSFTransparency (void) |
| Get the FresnelMaterial::_sfTransparency field. | |
| SFBool * | getSFLit (void) |
| Get the FresnelMaterial::_sfLit field. | |
| SFGLenum * | getSFColorMaterial (void) |
| Get the FresnelMaterial::_sfColorMaterial field. | |
| SFReal32 * | getSFIndex (void) |
| Get the FresnelMaterial::_sfIndex field. | |
| SFReal32 * | getSFScale (void) |
| Get the FresnelMaterial::_sfScale field. | |
| SFReal32 * | getSFBias (void) |
| Get the FresnelMaterial::_sfBias field. | |
| SFImagePtr * | getSFImage (void) |
| Get the FresnelMaterial::_sfImage field. | |
| Color3f & | getAmbient (void) |
| Get the value of the FresnelMaterial::_sfAmbient field. | |
| const Color3f & | getAmbient (void) const |
| Get the value of the FresnelMaterial::_sfAmbient field. | |
| Color3f & | getDiffuse (void) |
| Get the value of the FresnelMaterial::_sfDiffuse field. | |
| const Color3f & | getDiffuse (void) const |
| Get the value of the FresnelMaterial::_sfDiffuse field. | |
| Color3f & | getSpecular (void) |
| Get the value of the FresnelMaterial::_sfSpecular field. | |
| const Color3f & | getSpecular (void) const |
| Get the value of the FresnelMaterial::_sfSpecular field. | |
| Real32 & | getShininess (void) |
| Get the value of the FresnelMaterial::_sfShininess field. | |
| const Real32 & | getShininess (void) const |
| Get the value of the FresnelMaterial::_sfShininess field. | |
| Color3f & | getEmission (void) |
| Get the value of the FresnelMaterial::_sfEmission field. | |
| const Color3f & | getEmission (void) const |
| Get the value of the FresnelMaterial::_sfEmission field. | |
| Real32 & | getTransparency (void) |
| Get the value of the FresnelMaterial::_sfTransparency field. | |
| const Real32 & | getTransparency (void) const |
| Get the value of the FresnelMaterial::_sfTransparency field. | |
| bool & | getLit (void) |
| Get the value of the FresnelMaterial::_sfLit field. | |
| const bool & | getLit (void) const |
| Get the value of the FresnelMaterial::_sfLit field. | |
| GLenum & | getColorMaterial (void) |
| Get the value of the FresnelMaterial::_sfColorMaterial field. | |
| const GLenum & | getColorMaterial (void) const |
| Get the value of the FresnelMaterial::_sfColorMaterial field. | |
| Real32 & | getIndex (void) |
| Get the value of the FresnelMaterial::_sfIndex field. | |
| const Real32 & | getIndex (void) const |
| Get the value of the FresnelMaterial::_sfIndex field. | |
| Real32 & | getScale (void) |
| Get the value of the FresnelMaterial::_sfScale field. | |
| const Real32 & | getScale (void) const |
| Get the value of the FresnelMaterial::_sfScale field. | |
| Real32 & | getBias (void) |
| Get the value of the FresnelMaterial::_sfBias field. | |
| const Real32 & | getBias (void) const |
| Get the value of the FresnelMaterial::_sfBias field. | |
| ImagePtr & | getImage (void) |
| Get the value of the FresnelMaterial::_sfImage field. | |
| const ImagePtr & | getImage (void) const |
| Get the value of the FresnelMaterial::_sfImage field. | |
Field Set | |
| *void | setAmbient (const Color3f &value) |
| Set the value of the FresnelMaterial::_sfAmbient field. | |
| void | setDiffuse (const Color3f &value) |
| Set the value of the FresnelMaterial::_sfDiffuse field. | |
| void | setSpecular (const Color3f &value) |
| Set the value of the FresnelMaterial::_sfSpecular field. | |
| void | setShininess (const Real32 &value) |
| Set the value of the FresnelMaterial::_sfShininess field. | |
| void | setEmission (const Color3f &value) |
| Set the value of the FresnelMaterial::_sfEmission field. | |
| void | setTransparency (const Real32 &value) |
| Set the value of the FresnelMaterial::_sfTransparency field. | |
| void | setLit (const bool &value) |
| Set the value of the FresnelMaterial::_sfLit field. | |
| void | setColorMaterial (const GLenum &value) |
| Set the value of the FresnelMaterial::_sfColorMaterial field. | |
| void | setIndex (const Real32 &value) |
| Set the value of the FresnelMaterial::_sfIndex field. | |
| void | setScale (const Real32 &value) |
| Set the value of the FresnelMaterial::_sfScale field. | |
| void | setBias (const Real32 &value) |
| Set the value of the FresnelMaterial::_sfBias field. | |
| void | setImage (const ImagePtr &value) |
| Set the value of the FresnelMaterial::_sfImage 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 |
Rendering | |
| *virtual void | draw (DrawFunctor &func, DrawActionBase *action) |
| virtual void | draw (Geometry *geo, DrawActionBase *action) |
Access | |
| *bool | addChunk (StateChunkPtr chunk, Int32 slot=State::AutoSlotReplace) |
| bool | subChunk (StateChunkPtr chunk, Int32 slot=State::AutoSlotReplace) |
| Int32 | find (StateChunkPtr chunk) |
| StateChunkPtr | find (const FieldContainerType &type, Int32 slot=State::AutoSlotReplace) |
| virtual bool | operator== (const Material &other) |
Comparison | |
| virtual bool | operator== (const Material &other) const |
| *virtual bool | operator< (const Material &other) const |
| virtual bool | operator!= (const Material &other) 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. | |
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 FresnelMaterialPtr | create (void) |
| create a new instance of the class | |
| static FresnelMaterialPtr | 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 | AmbientFieldMask |
| static const osg::BitVector | DiffuseFieldMask |
| static const osg::BitVector | SpecularFieldMask |
| static const osg::BitVector | ShininessFieldMask |
| static const osg::BitVector | EmissionFieldMask |
| static const osg::BitVector | TransparencyFieldMask |
| static const osg::BitVector | LitFieldMask |
| static const osg::BitVector | ColorMaterialFieldMask |
| static const osg::BitVector | IndexFieldMask |
| static const osg::BitVector | ScaleFieldMask |
| static const osg::BitVector | BiasFieldMask |
| static const osg::BitVector | ImageFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const osg::BitVector | ChunksFieldMask |
| static const osg::BitVector | SlotsFieldMask |
| static const osg::BitVector | SortKeyFieldMask |
| static const BitVector | AttachmentsFieldMask |
| static const BitVector | NextFieldMask |
Constants | |
| *static const Int32 | NoStateSorting = 0x7fffffff |
Protected Member Functions | |
Constructors | |
| * | FresnelMaterial (void) |
| FresnelMaterial (const FresnelMaterial &source) | |
Destructors | |
| *virtual | ~FresnelMaterial (void) |
Sync | |
| *void | executeSyncImpl (FresnelMaterialBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (ChunkMaterialBase *pOther, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (MaterialBase *pOther, const BitVector &whichField) |
Protected Attributes | |
| StatePtr | _pState |
Fields | |
| *SFColor3f | _sfAmbient |
| SFColor3f | _sfDiffuse |
| SFColor3f | _sfSpecular |
| SFReal32 | _sfShininess |
| SFColor3f | _sfEmission |
| SFReal32 | _sfTransparency |
| SFBool | _sfLit |
| SFGLenum | _sfColorMaterial |
| SFReal32 | _sfIndex |
| SFReal32 | _sfScale |
| SFReal32 | _sfBias |
| SFImagePtr | _sfImage |
Fields | |
| *MFStateChunkPtr | _mfChunks |
| MFInt32 | _mfSlots |
Fields | |
| *SFInt32 | _sfSortKey |
Private Types | |
| typedef FresnelMaterialBase | Inherited |
Private Member Functions | |
| void | prepareLocalChunks (void) |
| void | updateFresnel (void) |
| void | operator= (const FresnelMaterial &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
Private Attributes | |
| MaterialChunkPtr | _materialChunk |
| TextureChunkPtr | _textureChunk |
| TexGenChunkPtr | _texGenChunk |
| BlendChunkPtr | _blendChunk |
| ImagePtr | _img |
Friends | |
| class | FieldContainer |
| class | FresnelMaterialBase |
Definition at line 60 of file OSGFresnelMaterial.h.
|
|
Reimplemented from osg::FresnelMaterialBase. Definition at line 64 of file OSGFresnelMaterial.h. |
|
|
Reimplemented from osg::ChunkMaterialBase. Definition at line 101 of file OSGFresnelMaterialBase.h. |
|
|
Reimplemented from osg::ChunkMaterialBase. Definition at line 103 of file OSGFresnelMaterialBase.h. 00104 { 00105 AmbientFieldId = Inherited::NextFieldId, 00106 DiffuseFieldId = AmbientFieldId + 1, 00107 SpecularFieldId = DiffuseFieldId + 1, 00108 ShininessFieldId = SpecularFieldId + 1, 00109 EmissionFieldId = ShininessFieldId + 1, 00110 TransparencyFieldId = EmissionFieldId + 1, 00111 LitFieldId = TransparencyFieldId + 1, 00112 ColorMaterialFieldId = LitFieldId + 1, 00113 IndexFieldId = ColorMaterialFieldId + 1, 00114 ScaleFieldId = IndexFieldId + 1, 00115 BiasFieldId = ScaleFieldId + 1, 00116 ImageFieldId = BiasFieldId + 1, 00117 NextFieldId = ImageFieldId + 1 00118 };
|
|
|
Definition at line 81 of file OSGFresnelMaterial.cpp. 00081 : 00082 Inherited(), 00083 _materialChunk(NullFC), 00084 _textureChunk(NullFC), 00085 _texGenChunk(NullFC), 00086 _blendChunk(NullFC), 00087 _img(NullFC) 00088 { 00089 }
|
|
|
Definition at line 91 of file OSGFresnelMaterial.cpp. 00091 : 00092 Inherited(source), 00093 _materialChunk(source._materialChunk), 00094 _textureChunk(source._textureChunk), 00095 _texGenChunk(source._texGenChunk), 00096 _blendChunk(source._blendChunk), 00097 _img(source._img) 00098 { 00099 }
|
|
|
Definition at line 101 of file OSGFresnelMaterial.cpp. References _blendChunk, _img, _materialChunk, osg::FresnelMaterialBase::_sfImage, _texGenChunk, _textureChunk, osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::NullFC, and osg::subRefCP(). 00102 { 00103 if(_sfImage.getValue() != NullFC) 00104 subRefCP(_sfImage.getValue()); 00105 00106 subRefCP(_materialChunk); 00107 subRefCP(_textureChunk); 00108 subRefCP(_texGenChunk); 00109 subRefCP(_blendChunk); 00110 subRefCP(_img); 00111 }
|
|
||||||||||||
|
||||||||||||
|
Reimplemented from osg::ChunkMaterial. Definition at line 270 of file OSGFresnelMaterial.cpp. References SLOG. 00272 { 00273 SLOG << "Dump FresnelMaterial NI" << std::endl; 00274 }
|
|
|
|
|
Check if the Material (i.e. any of its chunks) is transparent.. Reimplemented from osg::ChunkMaterial. Definition at line 387 of file OSGFresnelMaterial.cpp. References osg::Eps, osg::FresnelMaterialBase::getTransparency(), and osg::ChunkMaterial::isTransparent(). Referenced by makeState(), and rebuildState(). 00388 { 00389 return ((getTransparency() > Eps) || (Inherited::isTransparent())); 00390 }
|
|
|
Definition at line 46 of file OSGFresnelMaterial.inl. References osg::FresnelMaterialBase::_sfImage, osg::addRefCP(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::SField< FieldTypeT, fieldNameSpace >::setValue(), and osg::subRefCP(). Referenced by changed(). 00047 { 00048 addRefCP(pImage); 00049 00050 subRefCP(_sfImage.getValue()); 00051 00052 _sfImage.setValue(pImage); 00053 }
|
|
|
Definition at line 113 of file OSGFresnelMaterial.cpp. References _blendChunk, _img, _materialChunk, _texGenChunk, _textureChunk, osg::addRefCP(), osg::beginEditCP(), osg::BlendChunkBase::create(), osg::TexGenChunkBase::create(), osg::TextureChunkBase::create(), osg::MaterialChunkBase::create(), osg::ImageBase::create(), osg::endEditCP(), osg::NullFC, and osg::Image::OSG_RGBA_PF. Referenced by changed(), makeState(), and |