CFx SDK Documentation  2022 SP0
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
OdGsNode Class Referenceabstract

#include <GsNode.h>

Inheritance diagram for OdGsNode:
OdGsCache OdRxObject OdGsBlockNode OdGsContainerNode OdGsEntityNode OdGsLayerNode OdGsMaterialNode OdGsBlockReferenceNode OdGsLightNode OdGsMInsertBlockNode

Classes

struct  UpdateManagerContext
 

Public Member Functions

bool invalidVp () const
 
void setToDrawable (const OdGiDrawable *pUnderlyingDrawable)
 
 ODRX_DECLARE_MEMBERS (OdGsNode)
 
voidoperator new (size_t)
 
void operator delete (void *)
 
void addRef ()
 
void release ()
 
 OdGsNode (OdGsBaseModel *pModel, const OdGiDrawable *pUnderlyingDrawable)
 
virtual ~OdGsNode ()
 
OdGsBaseModelbaseModel () const
 
OdGsModelmodel () const
 
bool isContainer () const
 
virtual ENodeType nodeType () const =0
 
bool isSyncDrawable () const
 
virtual void invalidate (OdGsContainerNode *pParent, OdGsViewImpl *pView, OdUInt32 mask)=0
 
OdGiDrawablePtr underlyingDrawable () const
 
OdDbStub * underlyingDrawableId () const
 
virtual void update (OdGsUpdateContext &ctx, OdGsContainerNode *pParent, OdSiSpatialIndex *pParentIndex)=0
 
virtual void updateVisible (OdGsViewImpl *pViewImpl)
 
virtual void display (OdGsDisplayContext &ctx)=0
 
virtual void propagateLayerChanges (OdGsViewImpl &view)=0
 
virtual void highlight (bool bDoIt, bool bWholeBranch)
 
bool isHighlighted () const
 
bool isHighlightedAll () const
 
virtual void destroy ()=0
 
void hide (bool bDoIt)
 
bool isHidden () const
 
void setSelectableIfHidden (bool bSelectable)
 
bool isSelectableIfHidden () const
 
virtual bool saveNodeState (OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL) const
 
virtual bool loadNodeState (OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL)
 
virtual bool saveClientNodeState (OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer) const
 
virtual bool loadClientNodeState (OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer)
 
virtual bool postprocessNodeLoading (OdGsFiler *pFiler)
 
 TD_USING (OdGsCache::extents)
 
virtual bool extents (const OdGsView *pView, OdGeExtents3d &ext) const
 
virtual OdDb::LineWeight getMaxLineweightUsed () const
 
virtual void setDrawableNull ()
 
virtual void addContentToUpdateManager (OdUInt32 viewportId, OdGsUpdateManager *pManager, const UpdateManagerContext &context)
 
- Public Member Functions inherited from OdGsCache
 ODRX_DECLARE_MEMBERS (OdGsCache)
 
virtual bool extents (OdGeExtents3d &extents) const =0
 
- 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 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 Types

enum  {
  kPersistent = 0x00000001 , kContainer = 0x00000002 , kHLT = 0x00000004 , kHLT_All = 0x00000008 ,
  kSyncDrawable = 0x00000010 , kHidden = 0x00000020 , kSelectHidden = 0x00000040 , kLastFlag = kSelectHidden
}
 
enum  { kInvalidateVp = 0x80000000 }
 

Protected Member Functions

void setInvalidVp (bool val)
 
void clearDrawable ()
 
 OdGsNode (const OdGsNode &c)
 

Protected Attributes

OdGsNodem_pPrev
 
OdGsNodem_pNext
 
OdGsBaseModelm_pModel
 
voidm_underlyingDrawable
 
OdUInt32 m_flags
 

Static Protected Attributes

static GS_STATIC_EXPORT AllocatorArray s_aAlloc
 

Friends

class OdGsBaseModel
 
class OdGsViewImpl
 
GS_TOOLKIT_EXPORT OdGiDrawablePtr fxUnderlyingDrawable (const OdGsNode *)
 

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 custom GsNode objects which implement custom caching support for Teigha vectorization applications.

Remarks
Cached rendering information may be stored in a custom GsNode descendant for each drawable in an OdDbDatabase object.

This cached information can be fed into the Teigha vectorization framework during a redraw instead of making the usual calls to subWorldDraw() and subViewportDraw(), thereby greatly improving the speed of redraws.

Remarks
Clients should derive their custom node classes from this class.

Corresponding C++ library: TD_Gs <group OdGs_Classes>

Definition at line 59 of file GsNode.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
kPersistent 
kContainer 
kHLT 
kHLT_All 
kSyncDrawable 
kHidden 
kSelectHidden 
kLastFlag 

Definition at line 75 of file GsNode.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
kInvalidateVp 

Definition at line 89 of file GsNode.h.

Constructor & Destructor Documentation

◆ OdGsNode() [1/2]

OdGsNode::OdGsNode ( OdGsBaseModel pModel,
const OdGiDrawable pUnderlyingDrawable 
)
Parameters
pModel[in] Pointer to the BaseModel object.
pUnderlyingDrawable[in] Pointer to the underlying Drawable object.

◆ OdGsNode() [2/2]

OdGsNode::OdGsNode ( const OdGsNode c)
protected

◆ ~OdGsNode()

virtual OdGsNode::~OdGsNode ( )
virtual

Member Function Documentation

◆ addContentToUpdateManager()

virtual void OdGsNode::addContentToUpdateManager ( OdUInt32  viewportId,
OdGsUpdateManager pManager,
const UpdateManagerContext context 
)
inlinevirtual

Adds content of node to the update manager

Parameters
viewportId[in] Id of viewport
pManager[in] Pointer to the Update Manager instance
context[in] UpdateManagerContext that specify what values should be initialized

Reimplemented in OdGsEntityNode, and OdGsContainerNode.

Definition at line 238 of file GsNode.h.

◆ addRef()

void OdGsNode::addRef ( )
virtual
Remarks
OdGsNode objects perform no reference counting. This function does nothing but return.

Implements OdRxObject.

◆ baseModel()

OdGsBaseModel * OdGsNode::baseModel ( ) const
inline

Pointer to the BaseModel object associated with this Node object.

Definition at line 278 of file GsNode.h.

◆ clearDrawable()

void OdGsNode::clearDrawable ( )
protected

Removes the associations between the underlying Drawable object and this GsNode object.

◆ destroy()

virtual void OdGsNode::destroy ( )
pure virtual

◆ display()

virtual void OdGsNode::display ( OdGsDisplayContext &  ctx)
pure virtual

Paints the specified view with the cached data associated with this Node object.

Parameters
view[in] View to be painted.

Implemented in OdGsMaterialNode, OdGsLayerNode, OdGsEntityNode, OdGsContainerNode, and OdGsBlockNode.

◆ extents()

virtual bool OdGsNode::extents ( const OdGsView pView,
OdGeExtents3d ext 
) const
virtual

Reimplemented in OdGsEntityNode, and OdGsContainerNode.

◆ getMaxLineweightUsed()

virtual OdDb::LineWeight OdGsNode::getMaxLineweightUsed ( ) const
virtual

Reimplemented in OdGsEntityNode.

◆ hide()

void OdGsNode::hide ( bool  bDoIt)
inline

Definition at line 293 of file GsNode.h.

◆ highlight()

void OdGsNode::highlight ( bool  bDoIt,
bool  bWholeBranch 
)
inlinevirtual

Reimplemented in OdGsEntityNode, and OdGsMInsertBlockNode.

Definition at line 262 of file GsNode.h.

◆ invalidate()

virtual void OdGsNode::invalidate ( OdGsContainerNode pParent,
OdGsViewImpl pView,
OdUInt32  mask 
)
pure virtual

Invalidates the cached data within this object.

Parameters
pParent[in] Pointer to the ContainerNode object for this Node object.
pView[in] Pointer to the VectorizeView object for which data are to be invalidated.
mask[in] Mask.
Remarks
The cached data will be regenerated the next time this Node object is accessed.

Implemented in OdGsBlockNode, OdGsMaterialNode, OdGsLightNode, OdGsLayerNode, OdGsEntityNode, OdGsContainerNode, OdGsMInsertBlockNode, and OdGsBlockReferenceNode.

◆ invalidVp()

bool OdGsNode::invalidVp ( ) const
inline

Definition at line 91 of file GsNode.h.

◆ isContainer()

bool OdGsNode::isContainer ( ) const
inline

Returns true if and only if this Node object serves as a container for other Node objects.

Definition at line 283 of file GsNode.h.

◆ isHidden()

bool OdGsNode::isHidden ( ) const
inline

Definition at line 298 of file GsNode.h.

◆ isHighlighted()

bool OdGsNode::isHighlighted ( ) const
inline

Definition at line 268 of file GsNode.h.

◆ isHighlightedAll()

bool OdGsNode::isHighlightedAll ( ) const
inline

Definition at line 273 of file GsNode.h.

◆ isSelectableIfHidden()

bool OdGsNode::isSelectableIfHidden ( ) const
inline

Definition at line 308 of file GsNode.h.

◆ isSyncDrawable()

bool OdGsNode::isSyncDrawable ( ) const
inline

Definition at line 288 of file GsNode.h.

◆ loadClientNodeState()

virtual bool OdGsNode::loadClientNodeState ( OdGsFiler pFiler,
OdGsBaseVectorizer pVectorizer 
)
virtual

◆ loadNodeState()

virtual bool OdGsNode::loadNodeState ( OdGsFiler pFiler,
OdGsBaseVectorizer pVectorizer = NULL 
)
virtual

◆ model()

OdGsModel* OdGsNode::model ( ) const
virtual

Returns pointer to the Model object associated with this Cache object.

Implements OdGsCache.

◆ nodeType()

virtual ENodeType OdGsNode::nodeType ( ) const
pure virtual

◆ ODRX_DECLARE_MEMBERS()

OdGsNode::ODRX_DECLARE_MEMBERS ( OdGsNode  )

◆ operator delete()

void OdGsNode::operator delete ( void )

◆ operator new()

void* OdGsNode::operator new ( size_t  )

◆ postprocessNodeLoading()

virtual bool OdGsNode::postprocessNodeLoading ( OdGsFiler pFiler)
virtual

◆ propagateLayerChanges()

virtual void OdGsNode::propagateLayerChanges ( OdGsViewImpl view)
pure virtual

Invalidates parts of cache depended on layers modified since last regeneration.

Remarks
For internal use only. Returns this if and only if the this node is one of modified layers.

Implemented in OdGsMaterialNode, OdGsLayerNode, OdGsEntityNode, OdGsContainerNode, OdGsBlockReferenceNode, and OdGsBlockNode.

◆ release()

void OdGsNode::release ( )
virtual
Remarks
OdGsNode objects perform no reference counting. This function does nothing but return.

Implements OdRxObject.

◆ saveClientNodeState()

virtual bool OdGsNode::saveClientNodeState ( OdGsFiler pFiler,
OdGsBaseVectorizer pVectorizer 
) const
virtual

◆ saveNodeState()

virtual bool OdGsNode::saveNodeState ( OdGsFiler pFiler,
OdGsBaseVectorizer pVectorizer = NULL 
) const
virtual

◆ setDrawableNull()

virtual void OdGsNode::setDrawableNull ( )
virtual

Reset pointer to the underlying GiDrawable object associated with this Cache object.

Implements OdGsCache.

◆ setInvalidVp()

void OdGsNode::setInvalidVp ( bool  val)
inlineprotected

Definition at line 93 of file GsNode.h.

◆ setSelectableIfHidden()

void OdGsNode::setSelectableIfHidden ( bool  bSelectable)
inline

Definition at line 303 of file GsNode.h.

◆ setToDrawable()

void OdGsNode::setToDrawable ( const OdGiDrawable pUnderlyingDrawable)

◆ TD_USING()

OdGsNode::TD_USING ( OdGsCache::extents  )

◆ underlyingDrawable()

OdGiDrawablePtr OdGsNode::underlyingDrawable ( ) const
inline

Returns the underlying Drawable object associated with this Node object.

Definition at line 243 of file GsNode.h.

◆ underlyingDrawableId()

OdDbStub * OdGsNode::underlyingDrawableId ( ) const
inline

Returns ObjectID of the underlying Drawable object associated with this Node object.

Definition at line 255 of file GsNode.h.

◆ update()

virtual void OdGsNode::update ( OdGsUpdateContext &  ctx,
OdGsContainerNode pParent,
OdSiSpatialIndex pParentIndex 
)
pure virtual

Updates the cached data within this Node object for the specified VectorizeView and ContainerNode objects.

Parameters
pParent[in] Pointer to the ContainerNode object for this Node object.
view[in] VectorizeView object for which data are to be updated.

Implemented in OdGsMaterialNode, OdGsLayerNode, OdGsEntityNode, OdGsContainerNode, OdGsBlockReferenceNode, OdGsLightNode, and OdGsBlockNode.

◆ updateVisible()

virtual void OdGsNode::updateVisible ( OdGsViewImpl pViewImpl)
inlinevirtual

Updates the cached data if Node object is visible in specified view

Parameters
pViewImpl[in] pointer to the View Implementation

Reimplemented in OdGsEntityNode, and OdGsContainerNode.

Definition at line 177 of file GsNode.h.

Friends And Related Function Documentation

◆ fxUnderlyingDrawable

GS_TOOLKIT_EXPORT OdGiDrawablePtr fxUnderlyingDrawable ( const OdGsNode )
friend

◆ OdGsBaseModel

friend class OdGsBaseModel
friend

Definition at line 61 of file GsNode.h.

◆ OdGsViewImpl

friend class OdGsViewImpl
friend

Definition at line 62 of file GsNode.h.

Member Data Documentation

◆ m_flags

OdUInt32 OdGsNode::m_flags
mutableprotected

Definition at line 87 of file GsNode.h.

◆ m_pModel

OdGsBaseModel* OdGsNode::m_pModel
protected

Definition at line 72 of file GsNode.h.

◆ m_pNext

OdGsNode* OdGsNode::m_pNext
mutableprotected

Definition at line 68 of file GsNode.h.

◆ m_pPrev

OdGsNode* OdGsNode::m_pPrev
mutableprotected

Definition at line 67 of file GsNode.h.

◆ m_underlyingDrawable

void* OdGsNode::m_underlyingDrawable
protected

Definition at line 73 of file GsNode.h.

◆ s_aAlloc

GS_STATIC_EXPORT AllocatorArray OdGsNode::s_aAlloc
staticprotected

Definition at line 70 of file GsNode.h.


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