CFx SDK Documentation  2022 SP0
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
OdGiDrawable Class Referenceabstract

#include <GiDrawable.h>

Inheritance diagram for OdGiDrawable:
OdRxObject OdDAI::EntityInstance OdDbObject OdGiDrawableImpl< T > OdIfc::OdIfcCompound OdTfObject OdDAI::OdFileDescriptionAuto OdDAI::OdFileNameAuto OdDAI::OdFileSchemaAuto OdIfc::OdIfcEntity CAseDLPNTableRecord CFxBIMDatabase CFxBIMDatabaseReference CFxBIMEntity CFxBIMStorage OdDbAssocPersSubentManager OdDbBackground OdDbBlockRepresentationData OdDbBreakData OdDbBreakPointRef OdDbColor OdDbDataLink OdDbDataTable OdDbDatabase OdDbDictionary OdDbDictionaryVar OdDbDimAssoc OdDbEntity OdDbEvalExpr OdDbEvalGraph OdDbField OdDbFilter OdDbGeoData OdDbGroup OdDbIdBuffer OdDbIndex OdDbLSObject OdDbLinkedData OdDbLongTransaction OdDbMLeaderStyle OdDbMaterial OdDbMlineStyle OdDbModelDocViewStyle OdDbMotionPath OdDbNamedPath OdDbNavisworksDefinition OdDbObjectContextData OdDbPersSubentManager OdDbPlaceHolder OdDbPlotSettings OdDbPointCloudColorMap OdDbPointCloudDef OdDbPointCloudDefEx OdDbPointCloudDefReactor OdDbPointCloudDefReactorEx OdDbProxyObject OdDbRasterImageDef OdDbRasterImageDefReactor OdDbRasterVariables OdDbRenderEntry OdDbRenderEnvironment OdDbRenderGlobal OdDbRenderSettings OdDbScale OdDbSectionManager OdDbSectionSettings OdDbShHistory OdDbSortentsTable OdDbSun OdDbSymbolTable OdDbSymbolTableRecord OdDbSynergyMappings OdDbTableStyle OdDbUnderlayDefinition OdDbVbaProject OdDbViewRep OdDbViewRepCutDefinition OdDbViewRepModelPlaneDef OdDbViewRepModelSpaceViewSelSet OdDbViewRepOrientation OdDbViewRepOrientationDef OdDbViewRepProjectionDef OdDbViewRepSource OdDbViewRepSourceMgr OdDbViewRepStandard OdDbVisualStyle OdDbWipeoutVariables OdDbXrecord OdVLObject OdStaticRxObject< OdGiDrawableImpl< OdGiDrawable > > OdIfc::OdIfcCachedCompound OdTfDatabase

Public Types

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
}
 

Public Member Functions

 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
 
virtual bool isPersistent () const =0
 
virtual OdDbStub * id () const =0
 
virtual void setGsNode (OdGsCache *pGsNode)=0
 
virtual OdGsCachegsNode () const =0
 
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
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdGiDrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *traits) const =0
 
virtual bool subWorldDraw (OdGiWorldDraw *wd) const =0
 
virtual void subViewportDraw (OdGiViewportDraw *vd) const =0
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 

Friends

class OdGiDrawableOverrule
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class is the base class for all graphical objects, both transient and persistent.

Remarks
This interface must be implemented by all graphical objects. Such objects are capable of vectorizing themselves within the Teigha framework.

<group OdGi_Classes>

Definition at line 48 of file GiDrawable.h.

Member Enumeration Documentation

◆ DrawableType

Enumerator
kGeometry 
kDistantLight 
kPointLight 
kSpotLight 
kAmbientLight 
kSolidBackground 
kGradientBackground 
kImageBackground 
kGroundPlaneBackground 
kViewport 
kWebLight 
kSkyBackground 
kImageBasedLightingBackground 

Definition at line 85 of file GiDrawable.h.

◆ SetAttributesFlags

Enumerator
kDrawableNone 
kDrawableIsAnEntity 
kDrawableUsesNesting 
kDrawableIsCompoundObject 
kDrawableViewIndependentViewportDraw 
kDrawableIsInvisible 
kDrawableHasAttributes 
kDrawableRegenTypeDependantGeometry 
kDrawableIsDimension 
kDrawableRegenDraw 
kDrawableStandardDisplaySingleLOD 
kDrawableShadedDisplaySingleLOD 
kDrawableViewDependentViewportDraw 
kDrawableBlockDependentViewportDraw 
kDrawableIsExternalReference 
kDrawableNotPlottable 
kLastFlag 

Definition at line 56 of file GiDrawable.h.

Constructor & Destructor Documentation

◆ OdGiDrawable()

OdGiDrawable::OdGiDrawable ( )
protected

Member Function Documentation

◆ drawableType()

virtual DrawableType OdGiDrawable::drawableType ( ) const
inlinevirtual

◆ getGeomExtents()

virtual OdResult OdGiDrawable::getGeomExtents ( OdGeExtents3d extents) const
virtual

Returns a WCS bounding box that represents the extents of this entity.

Parameters
extents[out] Receives the WCS extents.
Returns
Returns eOk if successful or an appropriate error code if not.
Remarks
The default implementation of this function always returns eInvalidExtents.

Reimplemented in OdDbEntity, OdDbLSSymbolComponent, OdDbLayout, OdDbBlockTableRecord, and OdIfc::OdIfcProduct.

◆ gsNode()

virtual OdGsCache* OdGiDrawable::gsNode ( ) const
pure virtual

Returns the OdGsCache associated with this object.

Implemented in OdGiDrawableImpl< T >, OdDbObject, OdIfc::OdIfcEntity, OdIfc::OdIfcCompound, and OdIfc::OdIfcCachedCompound.

◆ id()

virtual OdDbStub* OdGiDrawable::id ( ) const
pure virtual

Returns the database ID of this object.

Remarks
Returns a null pointer if this object is not persistent.

Implemented in OdGiDrawableImpl< T >, OdDbObject, and OdIfc::OdIfcCompound.

◆ isPersistent()

virtual bool OdGiDrawable::isPersistent ( ) const
pure virtual

Returns true if and only if this object is persistent (stored in a database).

Implemented in OdGiDrawableImpl< T >, OdDbObject, and OdIfc::OdIfcCompound.

◆ ODRX_DECLARE_MEMBERS()

OdGiDrawable::ODRX_DECLARE_MEMBERS ( OdGiDrawable  )

◆ regenSupportFlags()

ODRX_SEALED_VIRTUAL OdUInt32 OdGiDrawable::regenSupportFlags ( ) const

Returns a set of flags that represents the multi-threaded rendering support of this entity.

Returns
Returns 0 if the drawable can be rendered only in a single threaded mode.
Remarks
The default implementation of this function returns flags defined with the OdRxClass::customFlags() method.

◆ setAttributes()

ODRX_SEALED_VIRTUAL OdUInt32 OdGiDrawable::setAttributes ( OdGiDrawableTraits pTraits) const

Sets the vectorization attributes of this object, and returns its attribute flags.

Parameters
pTraits[in] Pointer to OdGiDrawableTraits object from and to which the attributes are to be set.
Remarks
This function is called by the vectorization framework, prior to calling worldDraw() or viewportDraw(), to set the attributes for an object.
See also
SetAttributesFlags

◆ setGsNode()

virtual void OdGiDrawable::setGsNode ( OdGsCache pGsNode)
pure virtual

Assigns the specified OdGsCache to this object.

Parameters
pGsNode[in] Pointer to the OdGsCache to be assigned.

Implemented in OdDbObject, OdGiDrawableImpl< T >, OdIfc::OdIfcEntity, OdIfc::OdIfcCompound, and OdIfc::OdIfcCachedCompound.

◆ subRegenSupportFlags()

virtual OdUInt32 OdGiDrawable::subRegenSupportFlags ( ) const
protectedvirtual

◆ subSetAttributes()

virtual OdUInt32 OdGiDrawable::subSetAttributes ( OdGiDrawableTraits traits) const
protectedpure virtual

◆ subViewportDraw()

virtual void OdGiDrawable::subViewportDraw ( OdGiViewportDraw vd) const
protectedpure virtual

◆ subViewportDrawLogicalFlags()

virtual OdUInt32 OdGiDrawable::subViewportDrawLogicalFlags ( OdGiViewportDraw vd) const
protectedvirtual

◆ subWorldDraw()

virtual bool OdGiDrawable::subWorldDraw ( OdGiWorldDraw wd) const
protectedpure virtual

◆ viewportDraw()

ODRX_SEALED_VIRTUAL void OdGiDrawable::viewportDraw ( OdGiViewportDraw pVd) const

Creates a viewport-dependent geometric representation of this object.

Remarks
Causes OdGiDrawable to describe its geometry to the specified OdGiViewportDraw object.

This function is called once per viewport.

Remarks
By overriding this function, it is possible to have totally different images in each viewport; a schematic in one viewport, a layout in another.

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

Parameters
pVd[in] Pointer to the OdGiViewportDraw interface.

◆ viewportDrawLogicalFlags()

ODRX_SEALED_VIRTUAL OdUInt32 OdGiDrawable::viewportDrawLogicalFlags ( OdGiViewportDraw pVd) const

Returns the setAttributes flags for the current viewportDraw.

Parameters
pVd[in] Pointer to OdGiViewportDraw interface.
Remarks
The default implementation of this function always returns 0.

◆ worldDraw()

ODRX_SEALED_VIRTUAL bool OdGiDrawable::worldDraw ( OdGiWorldDraw pWd) const

Creates a viewport-independent geometric representation of this object.

Returns
Returns true if and only if the geometric representation can be generated in a viewport-independent manner.
Remarks
A return value of false indicates that viewportDraw() must be called for this object.

The 3D GS will call this function at least once but may cache subsequent display updates.

Use OdGsModel::onModified() to ensure that the 3D GS will call worldDraw() for next display update.

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

Parameters
pWd[in] Pointer to the OdGiWorldDraw interface.

Friends And Related Function Documentation

◆ OdGiDrawableOverrule

friend class OdGiDrawableOverrule
friend

Definition at line 221 of file GiDrawable.h.


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