CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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, OdUInt32 nSelStyle=0)
 
bool isHighlighted () const
 
bool isHighlightedAll () const
 
virtual void destroy ()=0
 
virtual void hide (bool bDoIt, bool bSelectable=false, bool bWholeBranch=true)
 
bool isHidden () const
 
bool isSelectableIfHidden () const
 
bool isHiddenAll () const
 
OdUInt32 selectionStyle () const
 
bool hasSelectionStyle () const
 
OdUInt32 userFlags () const
 
void setUserFlags (OdUInt32 val)
 
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
 
bool modelExtents (OdGeExtents3d &ext, bool bUseModelTf=true) const
 
bool modelExtents (const OdGsView *pView, OdGeExtents3d &ext, bool bUseModelTf=true) const
 
virtual OdDb::LineWeight getMaxLineweightUsed () const
 
virtual void setDrawableNull ()
 
virtual void addContentToUpdateManager (OdUInt32 viewportId, OdGsUpdateManager *pManager, const UpdateManagerContext &context)
 
virtual bool isMetafilesCompatible (const OdGsViewImpl *pView1, const OdGsViewImpl *pView2, OdGsUpdateContext *ctx)
 
- Public Member Functions inherited from OdGsCache
 ODRX_DECLARE_MEMBERS (OdGsCache)
 
virtual OdGsModelmodel () const =0
 
virtual void setDrawableNull ()=0
 
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 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 Types

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

Protected Member Functions

void setInvalidVp (bool val)
 
void clearDrawable ()
 
void setSelectionStyleImpl (OdUInt32 nStyle)
 
OdUInt32 getSelectionStyleImpl () const
 
 OdGsNode (const OdGsNode &c)
 

Protected Attributes

OdGsNodem_pPrev
 
OdGsNodem_pNext
 
OdGsBaseModelm_pModel
 
voidm_underlyingDrawable
 
OdUInt32 m_flags
 
OdUInt32 m_userFlags
 

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 client 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 ODA Platform 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

Enumerates GsNode states

Enumerator
kPersistent 
kContainer 
kHLT 
kHLT_All 
kSyncDrawable 
kHidden 
kSelectHidden 
kHiddenAll 
kSelStyle 
kLastFlag 

Definition at line 77 of file GsNode.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
kInvalidateVp 

Definition at line 96 of file GsNode.h.

Constructor & Destructor Documentation

◆ OdGsNode() [1/2]

OdGsNode::OdGsNode ( OdGsBaseModel pModel,
const OdGiDrawable pUnderlyingDrawable 
)

Constructor for the OdGsNode class.

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 a viewport.
pManager[in] Pointer to the Update Manager instance.
context[in] UpdateManagerContext that specify what values should be initialized.

Reimplemented in OdGsContainerNode, and OdGsEntityNode.

Definition at line 350 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

Returns a base model that is associated with this node.

Returns
Pointer to the BaseModel object associated with this Node object.

Definition at line 413 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
ctx[in] Current GS update context.

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

◆ extents()

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

Reimplemented in OdGsContainerNode, and OdGsEntityNode.

◆ getMaxLineweightUsed()

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

Reimplemented in OdGsEntityNode.

◆ getSelectionStyleImpl()

OdUInt32 OdGsNode::getSelectionStyleImpl ( ) const
protected

Internal part of selection style getter implementation.

Remarks
For internal use only.
See also
selectionStyle() method.

◆ hasSelectionStyle()

bool OdGsNode::hasSelectionStyle ( ) const
inline

Checks whether this node has a non-default selection style.

Returns
true if this node has a non-default selection style, false otherwise.

Definition at line 390 of file GsNode.h.

◆ hide()

virtual void OdGsNode::hide ( bool  bDoIt,
bool  bSelectable = false,
bool  bWholeBranch = true 
)
virtual

Hides the specified node.

Parameters
bDoIt[in] Flag that specifies whether to hide this node (true) or show it (false).
bSelectable[in] Flag that specifies whether this node should be selectable when it is hidden.
bWholeBranch[in] Flag that specifies whether the node hidden state should be changed for all branches.

Reimplemented in OdGsEntityNode.

◆ highlight()

void OdGsNode::highlight ( bool  bDoIt,
bool  bWholeBranch,
OdUInt32  nSelStyle = 0 
)
inlinevirtual

Highlights the specified node.

Parameters
bDoIt[in] Flag that specifies whether to highlight. If true - highlight, if false - unhighlight.
bWholeBranch[in] Specifies whether the node highlight state will be applied to all subentitites.
nSelStyle[in] Optional selection style index.

Reimplemented in OdGsMInsertBlockNode, and OdGsEntityNode.

Definition at line 395 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 OdGsBlockReferenceNode, OdGsMInsertBlockNode, OdGsContainerNode, OdGsEntityNode, OdGsLayerNode, OdGsLightNode, OdGsMaterialNode, and OdGsBlockNode.

◆ invalidVp()

bool OdGsNode::invalidVp ( ) const
inline

Definition at line 98 of file GsNode.h.

◆ isContainer()

bool OdGsNode::isContainer ( ) const
inline

Checks whether this node is a container for other nodes.

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

Definition at line 418 of file GsNode.h.

◆ isHidden()

bool OdGsNode::isHidden ( ) const
inline

Returns current node invisibility state.

Returns
true if current node is invisible, false otherwise.

Definition at line 428 of file GsNode.h.

◆ isHiddenAll()

bool OdGsNode::isHiddenAll ( ) const
inline

Returns true if and only if the whole node is hidden

Returns
Returns true if and only if the whole node is hidden

Definition at line 438 of file GsNode.h.

◆ isHighlighted()

bool OdGsNode::isHighlighted ( ) const
inline

Returns current node highlight state.

Returns
true if current node highlighted, false otherwise.

Definition at line 403 of file GsNode.h.

◆ isHighlightedAll()

bool OdGsNode::isHighlightedAll ( ) const
inline

Checks whether current node highlight state is applied to all subentities.

Returns
true if current highlight state is applies to all subentities, false otherwise.

Definition at line 408 of file GsNode.h.

◆ isMetafilesCompatible()

virtual bool OdGsNode::isMetafilesCompatible ( const OdGsViewImpl pView1,
const OdGsViewImpl pView2,
OdGsUpdateContext *  ctx 
)
inlinevirtual

Checks whether metafiles are compatible with for the specified vectorize views.

Parameters
pView1[in] Pointer to the VectorizeView
pView2[in] Pointer to the VectorizeView
Returns
true if and only if metafiles are compatible for the specified vectorize views.

Reimplemented in OdGsContainerNode, and OdGsEntityNode.

Definition at line 359 of file GsNode.h.

◆ isSelectableIfHidden()

bool OdGsNode::isSelectableIfHidden ( ) const
inline

Returns a flag that specifies whether this node should be selectable when it is hidden.

Returns
true if the node should be selectable when it is hidden, false otherwise.

Definition at line 433 of file GsNode.h.

◆ isSyncDrawable()

bool OdGsNode::isSyncDrawable ( ) const
inline

Checks whether this node is in sync with underlying drawable.

Returns
true if the node is in sync with underlying drawable, false otherwise.

Definition at line 423 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 a model that is associated with this node.

Returns
Pointer to the Model object associated with this Node object.

Implements OdGsCache.

◆ modelExtents() [1/2]

bool OdGsNode::modelExtents ( const OdGsView pView,
OdGeExtents3d ext,
bool  bUseModelTf = true 
) const

◆ modelExtents() [2/2]

bool OdGsNode::modelExtents ( OdGeExtents3d ext,
bool  bUseModelTf = true 
) const

◆ 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.

Parameters
view[in] View Implementation object.
Remarks
For internal use only. Returns this if and only if the this node is one of modified layers.

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

◆ 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

◆ selectionStyle()

OdUInt32 OdGsNode::selectionStyle ( ) const
inline

Returns node selection style.

Returns
Current node selection style.

Definition at line 383 of file GsNode.h.

◆ setDrawableNull()

virtual void OdGsNode::setDrawableNull ( )
virtual

Resets pointer to the underlying GiDrawable object associated with this Node object.

Implements OdGsCache.

◆ setInvalidVp()

void OdGsNode::setInvalidVp ( bool  val)
inlineprotected

Definition at line 100 of file GsNode.h.

◆ setSelectionStyleImpl()

void OdGsNode::setSelectionStyleImpl ( OdUInt32  nStyle)
protected

Internal part of selection style setter implementation.

Parameters
nStyle[in] Selection style index.
Remarks
For internal use only.
See also
highlight() method.

◆ setToDrawable()

void OdGsNode::setToDrawable ( const OdGiDrawable pUnderlyingDrawable)

Sets underlying drawable for current Node object.

Parameters
pUnderlyingDrawble[in] Drawable object pointer.

◆ setUserFlags()

void OdGsNode::setUserFlags ( OdUInt32  val)
inline

Sets user-defined flags.

Parameters
val[in] Set of user-defined flags.

Definition at line 448 of file GsNode.h.

◆ 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 364 of file GsNode.h.

◆ underlyingDrawableId()

OdDbStub * OdGsNode::underlyingDrawableId ( ) const
inline

Retrieves the underlying drawable that is associated with this node.

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

Definition at line 376 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 OdGsBlockNode, OdGsLightNode, OdGsBlockReferenceNode, OdGsContainerNode, OdGsEntityNode, OdGsLayerNode, and OdGsMaterialNode.

◆ 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 OdGsContainerNode, and OdGsEntityNode.

Definition at line 222 of file GsNode.h.

◆ userFlags()

OdUInt32 OdGsNode::userFlags ( ) const
inline

Returns user-defined flags.

Returns
Set of user-defined flags.

Definition at line 443 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 91 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.

◆ m_userFlags

OdUInt32 OdGsNode::m_userFlags
protected

Definition at line 94 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: