CFx SDK Documentation  2020SP3
Public Member Functions | List of all members
OdDbRenderSettings Class Reference

#include <DbRenderSettings.h>

Inheritance diagram for OdDbRenderSettings:
OdDbObject OdGiDrawable OdRxObject OdDbMentalRayRenderSettings OdDbRapidRTRenderSettings

Public Member Functions

 ODDB_DECLARE_MEMBERS (OdDbRenderSettings)
 
 OdDbRenderSettings ()
 
virtual ~OdDbRenderSettings ()
 
virtual OdGiDrawabledrawable ()
 
OdResult setName (const OdString &name)
 
OdString name () const
 
void setDescription (const OdString &description)
 
OdString description () const
 
void setDisplayIndex (int displayIndex)
 
int displayIndex () const
 
void setMaterialsEnabled (bool materialsEnabled)
 
bool materialsEnabled () const
 
void setTextureSampling (bool textureSampling)
 
bool textureSampling () const
 
void setBackFacesEnabled (bool backFacesEnabled)
 
bool backFacesEnabled () const
 
void setShadowsEnabled (bool shadowsEnabled)
 
bool shadowsEnabled () const
 
OdResult setPreviewImageFileName (const OdString &filename)
 
OdString previewImageFileName () const
 
void setDiagnosticBackgroundEnabled (bool diagnosticBackgroundEnabled)
 
bool diagnosticBackgroundEnabled () const
 
OdResult setIsPredefined (bool bSet)
 
bool isPredefined () const
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const
 
virtual bool operator== (const OdDbRenderSettings &settings)
 
- 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)
 
virtual OdResult subErase (bool erasing)
 
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 OdResult subGetClassID (void *pClsid) const
 
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 is a container class for the properties relevent to generic high-fidelity renderers.

Remarks
Database-resident OdDbRenderSettings objects are stored in the NamedObjectsDictionary under ACAD_RENDER_SETTINGS.

In addition, the active RenderSettings are stored in the NamedObjectsDictionary under ACAD_RENDER_ACTIVE_SETTINGS.

See also
TD_Db <group OdDb_Classes>

Definition at line 43 of file DbRenderSettings.h.

Constructor & Destructor Documentation

◆ OdDbRenderSettings()

OdDbRenderSettings::OdDbRenderSettings ( )

◆ ~OdDbRenderSettings()

virtual OdDbRenderSettings::~OdDbRenderSettings ( )
virtual

Member Function Documentation

◆ backFacesEnabled()

bool OdDbRenderSettings::backFacesEnabled ( ) const

Returns true if and only if back-facing faces are rendered for this RenderSettings object.

◆ description()

OdString OdDbRenderSettings::description ( ) const

Returns the description of this RenderSettings object.

◆ diagnosticBackgroundEnabled()

bool OdDbRenderSettings::diagnosticBackgroundEnabled ( ) const

Return true if and only if the diagnostic background is enabled for this RenderSettings object.

◆ displayIndex()

int OdDbRenderSettings::displayIndex ( ) const

Returns the DisplayIndex of this RenderSettings object.

Remarks
The DisplayIndex specfies the display order in the UI of the entries in the ACAD_RENDER_SETTINGS dictionary.

DisplayIndices need not be positive or consecutive, and are not intended for use as ID numbers.

◆ drawable()

virtual OdGiDrawable* OdDbRenderSettings::drawable ( )
virtual

Returns the OdGiDrawable for this RenderSettings object.

Reimplemented from OdDbObject.

◆ dwgInFields()

virtual OdResult OdDbRenderSettings::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 OdDbRapidRTRenderSettings, and OdDbMentalRayRenderSettings.

◆ dwgOutFields()

virtual void OdDbRenderSettings::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 OdDbRapidRTRenderSettings, and OdDbMentalRayRenderSettings.

◆ dxfInFields()

virtual OdResult OdDbRenderSettings::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 OdDbRapidRTRenderSettings, and OdDbMentalRayRenderSettings.

◆ dxfOutFields()

virtual void OdDbRenderSettings::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 OdDbRapidRTRenderSettings, and OdDbMentalRayRenderSettings.

◆ isPredefined()

bool OdDbRenderSettings::isPredefined ( ) const

Returns flag which is identifies does this render settings are predefined or not.

◆ materialsEnabled()

bool OdDbRenderSettings::materialsEnabled ( ) const

Returns true if and only if materials are rendered on a per-object basis for this RenderSettings object.

Remarks
If true, materials are rendered on a per-object basis. If false, all objects are rendered with the global material.

The default value for MaterialsEnabled == true.

◆ name()

OdString OdDbRenderSettings::name ( ) const

Returns the name of this RenderSettings object.

◆ ODDB_DECLARE_MEMBERS()

OdDbRenderSettings::ODDB_DECLARE_MEMBERS ( OdDbRenderSettings  )

◆ operator==()

virtual bool OdDbRenderSettings::operator== ( const OdDbRenderSettings settings)
virtual

◆ previewImageFileName()

OdString OdDbRenderSettings::previewImageFileName ( ) const

Returns the full filename of the preview image for this RenderSettings object.

Remarks

If the PreviewImageFileName is blank, no preview image is associated with this RenderSettings object.

◆ setBackFacesEnabled()

void OdDbRenderSettings::setBackFacesEnabled ( bool  backFacesEnabled)

Controls the rendering of back-facing faces for this RenderSettings object.

Parameters
backFacesEnabled[in] Controls BackFacesEnabled.
Remarks
Back-facing faces are rendered if and only if BackFacesEanbled == true;
The default value for BackFacesEnabled == true;

◆ setDescription()

void OdDbRenderSettings::setDescription ( const OdString description)

Sets the description of this RenderSettings object.

Parameters
description[in] Description.

◆ setDiagnosticBackgroundEnabled()

void OdDbRenderSettings::setDiagnosticBackgroundEnabled ( bool  diagnosticBackgroundEnabled)

Controls the rendering of the diagnostic background for this RenderSettings object.

Parameters
diagnosticBackgroundEnabled[in] Controls DiagnosticBackgroundEnabled.
Remarks
The diagnostic (checker) background overrides the background for this RenderSettings object.

The default value of DiagnosticBackgroundEnabled == false.

◆ setDisplayIndex()

void OdDbRenderSettings::setDisplayIndex ( int  displayIndex)

Sets the DisplayIndex of this RenderSettings object.

Parameters
displayIndex[in] DisplayIndex.
Remarks
The DisplayIndex specfies the display order in the UI of the entries in the ACAD_RENDER_SETTINGS dictionary.

DisplayIndices need not be positive or consecutive, and are not intended for use as ID numbers.

◆ setIsPredefined()

OdResult OdDbRenderSettings::setIsPredefined ( bool  bSet)

Sets flag which is identifies does this render settings are predefined or not.

Parameters
bSet[in] Set flag.
Returns
Returns eOk if successful, or an appropriate error code if not.

◆ setMaterialsEnabled()

void OdDbRenderSettings::setMaterialsEnabled ( bool  materialsEnabled)

Controls the rendering of materials on a per-object basis for this RenderSettings object.

Parameters
materialsEnabled[in] Controls MaterialsEnabled.
Remarks
If true, materials are rendered on a per-object basis. If false, all objects are rendered with the global material.

The default value for MaterialsEnabled == true.

◆ setName()

OdResult OdDbRenderSettings::setName ( const OdString name)

Sets the name of this RenderSettings object.

Parameters
name[in] Name.
Returns
Returns eOk if successful, or an appropriate error code if not.
Remarks
No check is made for RenderSettings objects with duplicate names.

◆ setPreviewImageFileName()

OdResult OdDbRenderSettings::setPreviewImageFileName ( const OdString filename)

Sets the full filename of the preview image for this RenderSettings object.

Parameters
filename[in] Filename.
Returns
Returns eOk if successful, or an appropriate error code if not.
Remarks
If the PreviewImageFileName is blank, no preview image is associated with this RenderSettings object. The default value for PreviewImageFileName is blank.

◆ setShadowsEnabled()

void OdDbRenderSettings::setShadowsEnabled ( bool  shadowsEnabled)

Controls the casting of shadows for this RenderSettings object.

Parameters
shadowsEnabled[in] Controls ShadowsEnabled.
Remarks
Shadows are cast if and only if ShadowsEnabled == true;
The default value for ShadowsEnabled == true;

◆ setTextureSampling()

void OdDbRenderSettings::setTextureSampling ( bool  textureSampling)

Controls the sampling of image textures for this RenderSettings object.

Parameters
textureSampling[in] Controls TextureSampling.

◆ shadowsEnabled()

bool OdDbRenderSettings::shadowsEnabled ( ) const

Returns true if and only if shadows are cast for this RenderSettings object.

◆ subSetAttributes()

virtual OdUInt32 OdDbRenderSettings::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.

Reimplemented in OdDbRapidRTRenderSettings, and OdDbMentalRayRenderSettings.

◆ textureSampling()

bool OdDbRenderSettings::textureSampling ( ) const

Returns true if and only if texture sampling is enabled for this RenderSettings object.


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