CFx SDK Documentation  2022 SP0
Public Member Functions | List of all members
OdDbMaterial Class Reference

#include <DbMaterial.h>

Inheritance diagram for OdDbMaterial:
OdDbObject OdGiDrawable OdRxObject CFxBIMMaterial

Public Member Functions

 ODDB_DECLARE_MEMBERS (OdDbMaterial)
 
 OdDbMaterial ()
 
virtual OdResult setName (const OdString &name)
 
virtual OdString name () const
 
virtual void setDescription (const OdString &description)
 
virtual OdString description () const
 
virtual void setAmbient (const OdGiMaterialColor &ambientColor)
 
virtual void ambient (OdGiMaterialColor &ambientColor) const
 
virtual void setDiffuse (const OdGiMaterialColor &diffuseColor, const OdGiMaterialMap &diffuseMap)
 
virtual void diffuse (OdGiMaterialColor &diffuseColor, OdGiMaterialMap &diffuseMap) const
 
virtual void setSpecular (const OdGiMaterialColor &specularColor, const OdGiMaterialMap &specularMap, double glossFactor)
 
virtual void specular (OdGiMaterialColor &specularColor, OdGiMaterialMap &specularMap, double &glossFactor) const
 
virtual void setReflection (const OdGiMaterialMap &reflectionMap)
 
virtual void reflection (OdGiMaterialMap &reflectionMap) const
 
virtual void setOpacity (double opacityPercentage, const OdGiMaterialMap &opacityMap)
 
virtual void opacity (double &opacityPercentage, OdGiMaterialMap &opacityMap) const
 
virtual void setBump (const OdGiMaterialMap &bumpMap)
 
virtual void bump (OdGiMaterialMap &map) const
 
virtual void setRefraction (double refractionIndex, const OdGiMaterialMap &refractionMap)
 
virtual void refraction (double &refractionIndex, OdGiMaterialMap &refractionMap) const
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual OdGiDrawabledrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const
 
virtual double translucence () const
 
virtual void setTranslucence (double translucence)
 
virtual double selfIllumination () const
 
virtual void setSelfIllumination (double selfIllumination)
 
virtual double reflectivity () const
 
virtual void setReflectivity (double reflectivity)
 
virtual OdGiMaterialTraits::Mode mode () const
 
virtual void setMode (OdGiMaterialTraits::Mode mode)
 
virtual OdGiMaterialTraits::ChannelFlags channelFlags () const
 
virtual void setChannelFlags (OdGiMaterialTraits::ChannelFlags channelFlags)
 
virtual OdGiMaterialTraits::IlluminationModel illuminationModel () const
 
virtual void setIlluminationModel (OdGiMaterialTraits::IlluminationModel illuminationMode)
 
virtual double colorBleedScale () const
 
virtual void setColorBleedScale (double scale)
 
virtual double indirectBumpScale () const
 
virtual void setIndirectBumpScale (double scale)
 
virtual double reflectanceScale () const
 
virtual void setReflectanceScale (double scale)
 
virtual double transmittanceScale () const
 
virtual void setTransmittanceScale (double scale)
 
virtual bool twoSided () const
 
virtual void setTwoSided (bool flag)
 
virtual OdGiMaterialTraits::LuminanceMode luminanceMode () const
 
virtual void setLuminanceMode (OdGiMaterialTraits::LuminanceMode mode)
 
virtual double luminance () const
 
virtual void setLuminance (double value)
 
virtual double shininess () const
 
virtual void setShininess (double value)
 
virtual void normalMap (OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod &method, double &strength) const
 
virtual void setNormalMap (const OdGiMaterialMap &normalMap, OdGiMaterialTraits::NormalMapMethod method, double strength)
 
virtual bool isAnonymous () const
 
virtual void setAnonymous (bool flag)
 
virtual OdGiMaterialTraits::GlobalIlluminationMode globalIllumination () const
 
virtual void setGlobalIllumination (OdGiMaterialTraits::GlobalIlluminationMode mode)
 
virtual OdGiMaterialTraits::FinalGatherMode finalGather () const
 
virtual void setFinalGather (OdGiMaterialTraits::FinalGatherMode mode)
 
virtual OdResult subGetClassID (void *pClsid) const
 
OdResult subErase (bool erasing)
 
- Public Member Functions inherited from OdDbObject
 ODDB_DECLARE_MEMBERS (OdDbObject)
 
 ~OdDbObject ()
 
void addRef ()
 
void release ()
 
long numRefs () const
 
OdDbObjectId objectId () const
 
OdDbHandle getDbHandle () const
 
OdDbHandle handle () const
 
OdDbObjectId ownerId () const
 
virtual void setOwnerId (OdDbObjectId ownerId)
 
OdDbDatabasedatabase () const
 
void createExtensionDictionary ()
 
OdDbObjectId extensionDictionary () const
 
bool releaseExtensionDictionary ()
 
OdDbXrecordPtr createXrecord (const OdString &xrecordName, OdDb::DuplicateRecordCloning style=OdDb::kDrcIgnore)
 
void upgradeOpen ()
 
void downgradeOpen ()
 
void cancel ()
 
virtual OdResult subOpen (OdDb::OpenMode mode)
 
virtual void subClose ()
 
OdResult erase (bool eraseIt=true)
 
void handOverTo (OdDbObject *pNewObject, bool keepXData=true, bool keepExtDict=true)
 
virtual void subHandOverTo (OdDbObject *pNewObject)
 
void swapIdWith (OdDbObjectId otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void audit (OdDbAuditInfo *pAuditInfo)
 
void dwgIn (OdDbDwgFiler *pFiler)
 
void dwgOut (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfIn (OdDbDxfFiler *pFiler)
 
virtual void dxfOut (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields_R12 (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields_R12 (OdDbDxfFiler *pFiler) const
 
virtual OdDb::DuplicateRecordCloning mergeStyle () const
 
virtual OdResBufPtr xData (const OdString &regappName=OdString::kEmpty) const
 
virtual void setXData (const OdResBuf *pRb)
 
bool isEraseStatusToggled () const
 
bool isErased () const
 
bool isReadEnabled () const
 
bool isWriteEnabled () const
 
bool isNotifyEnabled () const
 
bool isModified () const
 
bool isModifiedXData () const
 
bool isModifiedGraphics () const
 
bool isNewObject () const
 
bool isNotifying () const
 
bool isUndoing () const
 
bool isReallyClosing () const
 
bool isDBRO () const
 
void assertReadEnabled () const
 
void assertWriteEnabled (bool autoUndo=true, bool recordModified=true)
 
void assertNotifyEnabled () const
 
void disableUndoRecording (bool disable)
 
bool isUndoRecordingDisabled () const
 
OdDbDwgFilerundoFiler ()
 
virtual void applyPartialUndo (OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
 
void addReactor (OdDbObjectReactor *pReactor) const
 
void removeReactor (OdDbObjectReactor *pReactor) const
 
virtual void addPersistentReactor (const OdDbObjectId &objId)
 
virtual void removePersistentReactor (const OdDbObjectId &objId)
 
bool hasPersistentReactor (const OdDbObjectId &objId) const
 
OdDbObjectIdArray getPersistentReactors () const
 
OdDbObjectReactorArray getTransientReactors () const
 
virtual void recvPropagateModify (const OdDbObject *pSubObj)
 
virtual void xmitPropagateModify () const
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr deepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr wblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
virtual void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &ownerIdMap)
 
void setOdDbObjectIdsInFlux ()
 
bool isOdDbObjectIdsInFlux () const
 
virtual void copied (const OdDbObject *pObject, const OdDbObject *pNewObject)
 
virtual void erased (const OdDbObject *pObject, bool erasing=true)
 
virtual void goodbye (const OdDbObject *pObject)
 
virtual void openedForModify (const OdDbObject *pObject)
 
virtual void modified (const OdDbObject *pObject)
 
virtual void subObjModified (const OdDbObject *pObject, const OdDbObject *pSubObj)
 
virtual void modifyUndone (const OdDbObject *pObject)
 
virtual void modifiedXData (const OdDbObject *pObject)
 
virtual void unappended (const OdDbObject *pObject)
 
virtual void reappended (const OdDbObject *pObject)
 
bool isAProxy () const
 
virtual void objectClosed (const OdDbObjectId &objectId)
 
virtual void modifiedGraphics (const OdDbObject *pObject)
 
virtual void copyFrom (const OdRxObject *pSource)
 
bool hasSaveVersionOverride () const
 
void setHasSaveVersionOverride (bool hasSaveVersionOverride)
 
virtual OdDb::DwgVersion getObjectSaveVersion (const OdDbFiler *pFiler, OdDb::MaintReleaseVer *pMaintVer=0) const
 
virtual OdDbObjectPtr decomposeForSave (OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
virtual OdDbObjectPtr decomposeForSave (OdDb::SaveType format, OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
void convertForSave (OdDb::DwgVersion ver)
 
virtual void composeForLoad (OdDb::SaveType format, OdDb::DwgVersion version, OdDbAuditInfo *pAuditInfo)
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subViewportDraw (OdGiViewportDraw *pVd) const
 
virtual bool isPersistent () const
 
virtual OdDbStub * id () const
 
ODRX_SEALED_VIRTUAL OdResult getClassID (void *pClsid) const ODRX_SEALED
 
void setGsNode (OdGsCache *pNode)
 
OdGsCachegsNode () const
 
void xDataTransformBy (const OdGeMatrix3d &xfm)
 
bool hasFields () const
 
OdDbObjectId getField (const OdString &fieldName) const
 
OdDbObjectPtr getField (const OdString &fieldName, OdDb::OpenMode mode) const
 
virtual OdDbObjectId setField (const OdString &fieldName, OdDbField *pField)
 
virtual OdResult removeField (OdDbObjectId fieldId)
 
virtual OdDbObjectId removeField (const OdString &fieldName)
 
OdDbObjectId getFieldDictionary () const
 
OdDbObjectPtr getFieldDictionary (OdDb::OpenMode mode) const
 
virtual OdRxClasssaveAsClass (OdRxClass *pClass) const
 
- Public Member Functions inherited from OdGiDrawable
 ODRX_DECLARE_MEMBERS (OdGiDrawable)
 
virtual DrawableType drawableType () const
 
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes (OdGiDrawableTraits *pTraits) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool worldDraw (OdGiWorldDraw *pWd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL void viewportDraw (OdGiViewportDraw *pVd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags (OdGiViewportDraw *pVd) const ODRX_SEALED
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const
 
ODRX_SEALED_VIRTUAL OdUInt32 regenSupportFlags () const ODRX_SEALED
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Public Types inherited from OdGiDrawable
enum  SetAttributesFlags {
  kDrawableNone = 0 , kDrawableIsAnEntity = 1 , kDrawableUsesNesting = 2 , kDrawableIsCompoundObject = 4 ,
  kDrawableViewIndependentViewportDraw = 8 , kDrawableIsInvisible = 16 , kDrawableHasAttributes = 32 , kDrawableRegenTypeDependantGeometry = 64 ,
  kDrawableIsDimension = (kDrawableIsAnEntity + kDrawableIsCompoundObject + 128) , kDrawableRegenDraw = 256 , kDrawableStandardDisplaySingleLOD = 512 , kDrawableShadedDisplaySingleLOD = 1024 ,
  kDrawableViewDependentViewportDraw = 2048 , kDrawableBlockDependentViewportDraw = 4096 , kDrawableIsExternalReference = 8192 , kDrawableNotPlottable = 16384 ,
  kLastFlag = kDrawableNotPlottable
}
 
enum  DrawableType {
  kGeometry = 0 , kDistantLight = 1 , kPointLight = 2 , kSpotLight = 3 ,
  kAmbientLight , kSolidBackground , kGradientBackground , kImageBackground ,
  kGroundPlaneBackground , kViewport , kWebLight , kSkyBackground ,
  kImageBasedLightingBackground
}
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Protected Member Functions inherited from OdDbObject
 OdDbObject ()
 
virtual OdDbObjectPtr subDeepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
virtual OdDbObjectPtr subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
- Protected Member Functions inherited from OdGiDrawable
 OdGiDrawable ()
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 
- Protected Attributes inherited from OdDbObject
OdDbObjectImplm_pImpl
 

Detailed Description

This class represents Material properties for shaded entities.

<group OdDb_Classes>

Definition at line 38 of file DbMaterial.h.

Constructor & Destructor Documentation

◆ OdDbMaterial()

OdDbMaterial::OdDbMaterial ( )

Member Function Documentation

◆ ambient()

virtual void OdDbMaterial::ambient ( OdGiMaterialColor ambientColor) const
virtual

Returns the ambient (shadow) component of this Material object.

Parameters
ambientColor[out] Receives the ambient color.

◆ bump()

virtual void OdDbMaterial::bump ( OdGiMaterialMap map) const
virtual

Returns the bump component of this Material object.

Parameters
bumpMap[out] Receives the bump map.

◆ channelFlags()

virtual OdGiMaterialTraits::ChannelFlags OdDbMaterial::channelFlags ( ) const
virtual

Returns the channel flags of this material object.

◆ colorBleedScale()

virtual double OdDbMaterial::colorBleedScale ( ) const
virtual

Returns the color bleed scale of this Material object.

◆ description()

virtual OdString OdDbMaterial::description ( ) const
virtual

Returns the description of this Material object.

◆ diffuse()

virtual void OdDbMaterial::diffuse ( OdGiMaterialColor diffuseColor,
OdGiMaterialMap diffuseMap 
) const
virtual

Returns the diffuse (main) component of this Material object.

Parameters
diffuseColor[out] Receives the diffuse color.
diffuseMap[out] Receives the diffuse map.

◆ drawable()

virtual OdGiDrawable* OdDbMaterial::drawable ( )
virtual

Returns a pointer to the OdGiDrawable for the object. If the object doesn't have an associated OdGiDrawable object, this function returns NULL.

Reimplemented from OdDbObject.

◆ dwgInFields()

virtual OdResult OdDbMaterial::dwgInFields ( OdDbDwgFiler pFiler)
virtual

Reads the .dwg file data of this object.

Parameters
pFiler[in] Filer object from which data are read.
Returns
Returns the filer status.

This function is called by dwgIn() to allow the object to read its data.

When overriding this function:

1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned. 4) Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().

Reimplemented from OdDbObject.

Reimplemented in CFxBIMMaterial.

◆ dwgOutFields()

virtual void OdDbMaterial::dwgOutFields ( OdDbDwgFiler pFiler) const
virtual

Writes the .dwg file data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are written.
Remarks

This function is called by dwgIn() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.

Reimplemented from OdDbObject.

Reimplemented in CFxBIMMaterial.

◆ dxfInFields()

virtual OdResult OdDbMaterial::dxfInFields ( OdDbDxfFiler pFiler)
virtual

Reads the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer from which data are read.
Returns
Returns the filer status.

This function is called by dxfIn() to allow the object to read its data.

When overriding this function:

1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dxfInFields(pFiler) returned. 4) Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().

Reimplemented from OdDbObject.

Reimplemented in CFxBIMMaterial.

◆ dxfOutFields()

virtual void OdDbMaterial::dxfOutFields ( OdDbDxfFiler pFiler) const
virtual

Writes the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are to be written.
Remarks

This function is called by dxfOut() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 4) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.

Reimplemented from OdDbObject.

Reimplemented in CFxBIMMaterial.

◆ finalGather()

virtual OdGiMaterialTraits::FinalGatherMode OdDbMaterial::finalGather ( ) const
virtual

Returns the final gather mode of this Material object.

◆ globalIllumination()

virtual OdGiMaterialTraits::GlobalIlluminationMode OdDbMaterial::globalIllumination ( ) const
virtual

Returns the global illumination mode of this Material object.

◆ illuminationModel()

virtual OdGiMaterialTraits::IlluminationModel OdDbMaterial::illuminationModel ( ) const
virtual

Returns the illumination model of this Material object.

Remarks
The illumination model determines the type of shader used to render this Material object.

◆ indirectBumpScale()

virtual double OdDbMaterial::indirectBumpScale ( ) const
virtual

Returns the indirect bump scale of this Material object.

◆ isAnonymous()

virtual bool OdDbMaterial::isAnonymous ( ) const
virtual

Returns the anonymous material mode of this Material object.

◆ luminance()

virtual double OdDbMaterial::luminance ( ) const
virtual

Returns the luminance of this Material object.

◆ luminanceMode()

virtual OdGiMaterialTraits::LuminanceMode OdDbMaterial::luminanceMode ( ) const
virtual

Returns the luminance mode of this Material object.

◆ mode()

virtual OdGiMaterialTraits::Mode OdDbMaterial::mode ( ) const
virtual

Returns the mode of this Material object.

◆ name()

virtual OdString OdDbMaterial::name ( ) const
virtual

Returns the name of this Material object.

◆ normalMap()

virtual void OdDbMaterial::normalMap ( OdGiMaterialMap normalMap,
OdGiMaterialTraits::NormalMapMethod method,
double &  strength 
) const
virtual

Returns the normalMap component of this Material object.

Parameters
normalMap[out] Receives the normalMap.
method[out] Receives normal map method.
strength[out] Receives normal map strength factor.

◆ ODDB_DECLARE_MEMBERS()

OdDbMaterial::ODDB_DECLARE_MEMBERS ( OdDbMaterial  )

◆ opacity()

virtual void OdDbMaterial::opacity ( double &  opacityPercentage,
OdGiMaterialMap opacityMap 
) const
virtual

Returns the opacity component of this Material object.

Parameters
opacityPercentage[out] Receives the opacity percentage.
opacityMap[out] Receives the opacity map.

◆ reflectanceScale()

virtual double OdDbMaterial::reflectanceScale ( ) const
virtual

Returns the reflectance scale of this Material object.

◆ reflection()

virtual void OdDbMaterial::reflection ( OdGiMaterialMap reflectionMap) const
virtual

Returns the reflection component of this Material object.

Parameters
reflectionMap[out] Receives the reflection map.
Remarks
The reflection component creates a mirror finish on the entity .

◆ reflectivity()

virtual double OdDbMaterial::reflectivity ( ) const
virtual

Returns the refelectivity of this Material object.

◆ refraction()

virtual void OdDbMaterial::refraction ( double &  refractionIndex,
OdGiMaterialMap refractionMap 
) const
virtual

Returns the refraction component of this Material object.

Parameters
refractionIndex[out] Receives the refraction index.
refractionMap[out] Receives the refraction map.

◆ selfIllumination()

virtual double OdDbMaterial::selfIllumination ( ) const
virtual

Returns the self-illumination of this Material object.

◆ setAmbient()

virtual void OdDbMaterial::setAmbient ( const OdGiMaterialColor ambientColor)
virtual

Sets the ambient (shadow) component of this Material object.

Parameters
ambientColor[in] Ambient color.

◆ setAnonymous()

virtual void OdDbMaterial::setAnonymous ( bool  flag)
virtual

Sets the anonymous material mode of this Material object.

Parameters
flag[in] Anonymous mode flag.

◆ setBump()

virtual void OdDbMaterial::setBump ( const OdGiMaterialMap bumpMap)
virtual

Sets the bump component of this Material object.

Parameters
bumpMap[in] Bump map.

◆ setChannelFlags()

virtual void OdDbMaterial::setChannelFlags ( OdGiMaterialTraits::ChannelFlags  channelFlags)
virtual

Sets the channel flags for this material object.

Remarks
This allows multiple channels to be added to a material and each channel to be enabled or disabled individually.
Parameters
channelFlags[in] channel flags.

◆ setColorBleedScale()

virtual void OdDbMaterial::setColorBleedScale ( double  scale)
virtual

Sets the color bleed scale of this Material object.

Parameters
scale[in] Color bleed scale.

◆ setDescription()

virtual void OdDbMaterial::setDescription ( const OdString description)
virtual

Sets the description of this Material object.

Parameters
description[in] Description.
Returns
Returns eOk if successful, or an appropriate error code if not.

◆ setDiffuse()

virtual void OdDbMaterial::setDiffuse ( const OdGiMaterialColor diffuseColor,
const OdGiMaterialMap diffuseMap 
)
virtual

Sets the diffuse (main) component of this Material object.

Parameters
diffuseColor[in] Diffuse color.
diffuseMap[in] Diffuse map.

◆ setFinalGather()

virtual void OdDbMaterial::setFinalGather ( OdGiMaterialTraits::FinalGatherMode  mode)
virtual

Sets the final gather mode of this Material object.

Parameters
mode[in] Final gather mode.

◆ setGlobalIllumination()

virtual void OdDbMaterial::setGlobalIllumination ( OdGiMaterialTraits::GlobalIlluminationMode  mode)
virtual

Sets the global illumination mode of this Material object.

Parameters
mode[in] Global illumination mode.

◆ setIlluminationModel()

virtual void OdDbMaterial::setIlluminationModel ( OdGiMaterialTraits::IlluminationModel  illuminationMode)
virtual

Sets the illumination model of this Material object.

Parameters
illuminationModel[in] Illumination model.

◆ setIndirectBumpScale()

virtual void OdDbMaterial::setIndirectBumpScale ( double  scale)
virtual

Sets the indirect bump scale of this Material object.

Parameters
scale[in] Indirect bump scale.

◆ setLuminance()

virtual void OdDbMaterial::setLuminance ( double  value)
virtual

Sets the luminance of this Material object.

Parameters
value[in] Luminance value.

◆ setLuminanceMode()

virtual void OdDbMaterial::setLuminanceMode ( OdGiMaterialTraits::LuminanceMode  mode)
virtual

Sets the luminance mode of this Material object.

Parameters
mode[in] Luminance mode.

◆ setMode()

virtual void OdDbMaterial::setMode ( OdGiMaterialTraits::Mode  mode)
virtual

Sets the mode of this Material object.

Parameters
mode[in] Mode.

◆ setName()

virtual OdResult OdDbMaterial::setName ( const OdString name)
virtual

Sets the name of this Material object.

Parameters
name[in] Name.
Returns
Returns eOk if successful, or an appropriate error code if not.

◆ setNormalMap()

virtual void OdDbMaterial::setNormalMap ( const OdGiMaterialMap normalMap,
OdGiMaterialTraits::NormalMapMethod  method,
double  strength 
)
virtual

Sets the normalMap component of this Material object.

Parameters
normalMap[in] Normal map.
method[in] Normal map method.
strength[in] Normal map strength factor.

◆ setOpacity()

virtual void OdDbMaterial::setOpacity ( double  opacityPercentage,
const OdGiMaterialMap opacityMap 
)
virtual

Sets the opacity component of this Material object.

Parameters
opacityPercentage[in] Opacity percentage.
opacityMap[in] Opacity map.

◆ setReflectanceScale()

virtual void OdDbMaterial::setReflectanceScale ( double  scale)
virtual

Sets the reflectance scale of this Material object.

Parameters
scale[in] Reflectance scale.

◆ setReflection()

virtual void OdDbMaterial::setReflection ( const OdGiMaterialMap reflectionMap)
virtual

Sets the reflection component of this Material object.

Parameters
reflectionMap[in] Reflection map.
Remarks
The reflection component creates a mirror finish on the entity.

◆ setReflectivity()

virtual void OdDbMaterial::setReflectivity ( double  reflectivity)
virtual

Sets the reflectivity of this Material object.

Parameters
reflectivity[in] Reflectivity.

◆ setRefraction()

virtual void OdDbMaterial::setRefraction ( double  refractionIndex,
const OdGiMaterialMap refractionMap 
)
virtual

Sets the refraction component of this Material object.

Parameters
refractionIndex[in] Refraction index.
refractionMap[in] Refraction map.

◆ setSelfIllumination()

virtual void OdDbMaterial::setSelfIllumination ( double  selfIllumination)
virtual

Sets the self-illumination of this material object

Parameters
selfIllumination[in] Self-illumination.

◆ setShininess()

virtual void OdDbMaterial::setShininess ( double  value)
virtual

Sets the shininess of this Material object.

Remarks
See also specular gloss factor.
Parameters
value[in] Shinincess value.

◆ setSpecular()

virtual void OdDbMaterial::setSpecular ( const OdGiMaterialColor specularColor,
const OdGiMaterialMap specularMap,
double  glossFactor 
)
virtual

Sets the specular (reflection) component of this Material object.

Parameters
specularColor[in] Specular color.
specularMap[in] Specular map.
glossFactor[in] Gloss factor.
Remarks
The specular component is viewpoint dependent, and most apparent when the entity is highlighted.

◆ setTranslucence()

virtual void OdDbMaterial::setTranslucence ( double  translucence)
virtual

Sets the translucence of this Material object.

Parameters
translucence[in] Translucense.

◆ setTransmittanceScale()

virtual void OdDbMaterial::setTransmittanceScale ( double  scale)
virtual

Sets the transmittance scale of this Material object.

Parameters
scale[in] Transmittance scale.

◆ setTwoSided()

virtual void OdDbMaterial::setTwoSided ( bool  flag)
virtual

Sets the two sided mode of this Material object.

Parameters
flag[in] Two sided mode flag.

◆ shininess()

virtual double OdDbMaterial::shininess ( ) const
virtual

Returns the shininess of this Material object.

Remarks
See also specular gloss factor.

◆ specular()

virtual void OdDbMaterial::specular ( OdGiMaterialColor specularColor,
OdGiMaterialMap specularMap,
double &  glossFactor 
) const
virtual

Returns the specular (reflection) component of this Material object.

Parameters
specularColor[out] Receives the specular color.
specularMap[out] Receives the specular map.
glossFactor[out] Receives the gloss factor.
Remarks
The specular component is viewpoint dependent, and most apparent when the entity is highlighted.

◆ subErase()

OdResult OdDbMaterial::subErase ( bool  erasing)
virtual

Called as the first operation as this object is being erased or unerased.

Parameters
erasing[in] A copy of the erasing argument passed to erase().
Remarks
This function is notified just before the current object is to be erased, giving this function the ability to cancel the erase.

Returns eOk if and only if erase() is to continue.

When overriding this function:

1) If the OdDbObject's state is incorrect, return something other than eOk.

2) If the parent class's subErase() returns anything other than eOk, immediately return it.

3) If other actions are required before erase, do them.

4) Return eOk.

If you must make changes to this object's state, either make them after step 2, or roll them back if step 2 returns other than eOk.

The default implementation of this function does nothing but return eOk. This function can be overridden in custom classes.

Reimplemented from OdDbObject.

◆ subGetClassID()

virtual OdResult OdDbMaterial::subGetClassID ( void pClsid) const
virtual

Reimplemented from OdDbObject.

◆ subSetAttributes()

virtual OdUInt32 OdDbMaterial::subSetAttributes ( OdGiDrawableTraits pTraits) const
virtual

Sets the values of this object's subentity traits, and returns with the calling object's subentity traits.

Parameters
pTraits[in] Pointer to the OdGiDrawableTraits object to be set.
Remarks
When overriding subSetAttributes(), you must OR (|) the return value of <base class>::subSetAttributes(pTraits) with any flags you add.

A derived class may not remove flags for any reason.

The default implementation does nothing but returns kDrawableNone. This function can be overridden in custom classes.

Reimplemented from OdDbObject.

◆ translucence()

virtual double OdDbMaterial::translucence ( ) const
virtual

Returns the translucence of this Material object.

◆ transmittanceScale()

virtual double OdDbMaterial::transmittanceScale ( ) const
virtual

Returns the transmittance scale of this Material object.

◆ twoSided()

virtual bool OdDbMaterial::twoSided ( ) const
virtual

Returns the two sided mode of this Material object.


The documentation for this class was generated from the following file: