CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
OdGiDrawable Class Referenceabstract

#include <GiDrawable.h>

Inheritance diagram for OdGiDrawable:
OdRxObject OdGiDrawableImpl< OdGiDrawable > OdDbGeoDataChunks OdDbGeoDataMarker OdDbGeoDataProvidersString OdDbObject OdGiDrawableImpl< T > OdIfc::OdIfcCompound OdTfObject

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 ,
  kDrawableNotAllowLCS = 32768 , kDrawableMergeControlOff = 65536 , kLastFlag = kDrawableMergeControlOff
}
 
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 ODA Platform.

<group OdGi_Classes>

Definition at line 47 of file GiDrawable.h.

Member Enumeration Documentation

◆ DrawableType

Drawable types.

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

Definition at line 90 of file GiDrawable.h.

◆ SetAttributesFlags

Attribute flags for a drawable.

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

Definition at line 57 of file GiDrawable.h.

Constructor & Destructor Documentation

◆ OdGiDrawable()

OdGiDrawable::OdGiDrawable ( )
protected

Member Function Documentation

◆ drawableType()

virtual DrawableType OdGiDrawable::drawableType ( ) const
inlinevirtual

Retrieves a type of this drawable.

Returns
value from the DrawableType enumeration that represents one of the drawable types.

Reimplemented in OdDbSolidBackground, OdDbGradientBackground, OdDbImageBackground, OdDbGroundPlaneBackground, OdDbSkyBackground, OdDbIBLBackground, OdDbLight, and OdDbSun.

Definition at line 113 of file GiDrawable.h.

◆ getGeomExtents()

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

Retrieves 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 OdIfc::OdIfcProduct, OdIfc::OdIfcShapeRepresentation, OdDbBlockTableRecord, OdDbLayout, OdDbLSSymbolComponent, and OdDbEntity.

◆ gsNode()

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

Retrieves the OdGsCache associated with this object.

Returns
Pointer to the OdGsCache that represents cache associated with this object.

Implemented in OdIfc::OdIfcCachedCompound, OdIfc::OdIfcCompound, OdDbObject, OdGiDrawableImpl< T >, OdGiDrawableImpl< OdGiDrawable >, OdDbGeoDataChunks, OdDbGeoDataProvidersString, and OdDbGeoDataMarker.

◆ id()

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

Retrieves the database ID of this object.

Returns
pointer to OdDbStub which represents a database identifier of this object.
Remarks
Returns a null pointer if this object is not persistent.

Implemented in OdIfc::OdIfcCompound, OdDbObject, OdGiDrawableImpl< T >, OdGiDrawableImpl< OdGiDrawable >, OdDbGeoDataChunks, OdDbGeoDataProvidersString, and OdDbGeoDataMarker.

◆ isPersistent()

virtual bool OdGiDrawable::isPersistent ( ) const
pure virtual

Checks whether this object is persistent (stored in a database).

Returns
true this object is persistent (stored in a database), false otherwise.

Implemented in OdIfc::OdIfcCompound, OdDbObject, OdGiDrawableImpl< T >, OdGiDrawableImpl< OdGiDrawable >, OdDbGeoDataChunks, OdDbGeoDataProvidersString, and OdDbGeoDataMarker.

◆ ODRX_DECLARE_MEMBERS()

OdGiDrawable::ODRX_DECLARE_MEMBERS ( OdGiDrawable  )

◆ regenSupportFlags()

ODRX_SEALED_VIRTUAL OdUInt32 OdGiDrawable::regenSupportFlags ( ) const

Retrieves 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 OdIfc::OdIfcCachedCompound, OdIfc::OdIfcCompound, OdGiDrawableImpl< T >, OdGiDrawableImpl< OdGiDrawable >, OdDbGeoDataChunks, OdDbGeoDataProvidersString, OdDbGeoDataMarker, and OdDbObject.

◆ 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

Retrieves the setAttributes flags for the current viewportDraw.

Parameters
pVd[in] Pointer to OdGiViewportDraw interface.
Returns
0 in default implementation, must return setAttributes flags for the specified viewportDraw.
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 244 of file GiDrawable.h.


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