CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdGsLayerNode Class Reference

#include <GsLayerNode.h>

Inheritance diagram for OdGsLayerNode:
OdGsNode OdGsCache OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGsLayerNode)
 
 OdGsLayerNode (OdGsBaseModel *pModel, const OdGiDrawable *pUnderlyingDrawable, bool bSetGsNode=true)
 
 ~OdGsLayerNode ()
 
void destroy ()
 
OdGiLayerTraitsDatalayerTraits (OdUInt32 nVpId, bool bVpFrozen=true)
 
const OdGiLayerTraitsDatalayerTraits (OdUInt32 nVpId, bool bVpFrozen=true) const
 
void reserveLayerTraits (OdUInt32 nVpId)
 
bool isDirty () const
 
void setDirty (bool bDirty)
 
bool isUpToDate (OdUInt32 nVpId) const
 
bool isValidCache (OdUInt32 nVpId) const
 
void setCacheUpToDate (OdUInt32 nVpId)
 
bool isInvalidated () const
 
bool isVpDep () const
 
virtual ENodeType nodeType () const
 
bool isVpFrozen () const
 
bool isFrozen () const
 
void invalidate (OdGsContainerNode *pParent, OdGsViewImpl *pView, OdUInt32 mask)
 
virtual void update (OdGsBaseVectorizer &view)
 
bool isTraitsCompatible (OdUInt32 nVpId1, OdUInt32 nVpId2) const
 
bool saveNodeState (OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL) const
 
bool loadNodeState (OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL)
 
- Public Member Functions inherited from OdGsNode
bool invalidVp () const
 
void setToDrawable (const OdGiDrawable *pUnderlyingDrawable)
 
 ODRX_DECLARE_MEMBERS (OdGsNode)
 
voidoperator new (size_t)
 
void operator delete (void *)
 
void addRef ()
 
void release () ODRX_NOEXCEPT
 
 OdGsNode (OdGsBaseModel *pModel, const OdGiDrawable *pUnderlyingDrawable)
 
virtual ~OdGsNode ()
 
OdGsBaseModelbaseModel () const
 
OdGsModelmodel () const
 
bool isContainer () const
 
bool isSyncDrawable () const
 
OdGiDrawablePtr underlyingDrawable () const
 
OdDbStub * underlyingDrawableId () const
 
virtual void updateVisible (OdGsViewImpl *pViewImpl)
 
virtual void highlight (bool bDoIt, bool bWholeBranch, OdUInt32 nSelStyle=0)
 
bool isHighlighted () const
 
bool isHighlightedAll () const
 
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 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)
 
- 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 Member Functions

void update (OdGsUpdateContext &ctx, OdGsContainerNode *pParent, OdSiSpatialIndex *pParentIndex)
 
virtual void display (OdGsDisplayContext &ctx)
 
bool extents (OdGeExtents3d &) const
 
void propagateLayerChanges (OdGsViewImpl &view)
 
void updateVpFrozen (OdGsViewImpl *pView)
 
- Protected Member Functions inherited from OdGsNode
void setInvalidVp (bool val)
 
void clearDrawable ()
 
void setSelectionStyleImpl (OdUInt32 nStyle)
 
OdUInt32 getSelectionStyleImpl () const
 
 OdGsNode (const OdGsNode &c)
 

Protected Attributes

OdGiLayerTraitsData m_layerTraits
 
OdGiLayerTraitsDataArray m_vpLayerTraits
 
OdGiLayerTraitsDataArray m_vpFrozenTraits
 
OdGsLayerNodem_pNextChanged
 
- Protected Attributes inherited from OdGsNode
OdGsNodem_pPrev
 
OdGsNodem_pNext
 
OdGsBaseModelm_pModel
 
voidm_underlyingDrawable
 
OdUInt32 m_flags
 
OdUInt32 m_userFlags
 

Friends

class OdGsBaseModel
 
class OdGsEmptyMetafileCache
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
static void rxInit ()
 
static void rxUninit ()
 
- Protected Types inherited from OdGsNode
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 }
 
- Static Protected Attributes inherited from OdGsNode
static GS_STATIC_EXPORT AllocatorArray s_aAlloc
 

Detailed Description

<group OdGs_Classes>

Definition at line 43 of file GsLayerNode.h.

Constructor & Destructor Documentation

◆ OdGsLayerNode()

OdGsLayerNode::OdGsLayerNode ( OdGsBaseModel * pModel,
const OdGiDrawable * pUnderlyingDrawable,
bool bSetGsNode = true )

Constructor for the OdGsLayerNode class.

Parameters
pModel[in] Pointer to the BaseModel object.
pUnderlyingDrawable[in] Pointer to the underlying Drawable object.
bSetGsNode[in] Flag that controls whether to set GS node to the underlying drawable.

◆ ~OdGsLayerNode()

OdGsLayerNode::~OdGsLayerNode ( )

Destructor for the OdGsLayerNode class.

Member Function Documentation

◆ destroy()

void OdGsLayerNode::destroy ( )
inlinevirtual

Destroys a layer node. Does nothing in default implementation.

Implements OdGsNode.

Definition at line 124 of file GsLayerNode.h.

◆ display()

virtual void OdGsLayerNode::display ( OdGsDisplayContext & ctx)
protectedvirtual

Paints the specified view with the cached data associated with this Node object. Does nothing in default implementation.

Parameters
ctx[in] Display context.

Implements OdGsNode.

◆ extents()

bool OdGsLayerNode::extents ( OdGeExtents3d & ) const
protectedvirtual

Returns extents of this container node object. Does nothing in default implementation.

Returns
false

Implements OdGsCache.

◆ invalidate()

void OdGsLayerNode::invalidate ( OdGsContainerNode * pParent,
OdGsViewImpl * pView,
OdUInt32 mask )
virtual

Invalidates this layer node.

Parameters
pParent[in] Parent container node.
view[in] Implementation view object for which data is invalidated.
mask[in] Mask.

Implements OdGsNode.

◆ isDirty()

bool OdGsLayerNode::isDirty ( ) const
inline

Definition at line 268 of file GsLayerNode.h.

◆ isFrozen()

bool OdGsLayerNode::isFrozen ( ) const
inline

Checks whether this layer node is frozen.

Returns
true if this layer node is frozen, false otherwise.

Definition at line 324 of file GsLayerNode.h.

◆ isInvalidated()

bool OdGsLayerNode::isInvalidated ( ) const
inline

Checks whether this layer node is marked as invalid.

Returns
true if this layer node is marked as invalid, false otherwise.

Definition at line 292 of file GsLayerNode.h.

◆ isTraitsCompatible()

bool OdGsLayerNode::isTraitsCompatible ( OdUInt32 nVpId1,
OdUInt32 nVpId2 ) const

Checks whether layer traits of the specified viewports are compatible. Layer traits are compatible if: Layer colors are equal Layer lineweights are equal Layer linetypes are equal Layer plot style name types are equal OR plot style name identifiers are equal in case if plotStyleNameType() == OdDb::kPlotStyleNameById Layer material identifiers are equal At least of the layers that some flags set.

Parameters
nVpId1[in] First viewport that has layer traits associated to it.
nVpId2[in] Second viewport that has layer traits associated to it.
Returns
true if layer traits are compatible.

◆ isUpToDate()

bool OdGsLayerNode::isUpToDate ( OdUInt32 nVpId) const
inline

Checks whether this layer node is up to date.

Parameters
nVpId[in] Viewport ID for viewport-dependent layer nodes.
Returns
true if this layer node is up to date, false otherwise

Definition at line 279 of file GsLayerNode.h.

◆ isValidCache()

bool OdGsLayerNode::isValidCache ( OdUInt32 nVpId) const

Checks whether cache of this layer node is valid.

Parameters
nVpId[in] Viewport ID for viewport-dependent layer nodes.
Returns
true if cache of this layer node is valid, false otherwise

◆ isVpDep()

bool OdGsLayerNode::isVpDep ( ) const
inline

Checks whether this layer node is viewport-dependent.

Returns
true if this layer node is viewport-dependent, false otherwise.

Definition at line 297 of file GsLayerNode.h.

◆ isVpFrozen()

bool OdGsLayerNode::isVpFrozen ( ) const
inline

Checks whether this layer node is frozen.

Returns
true if this layer node is frozen, false otherwise.

Definition at line 319 of file GsLayerNode.h.

◆ layerTraits() [1/2]

OdGiLayerTraitsData & OdGsLayerNode::layerTraits ( OdUInt32 nVpId,
bool bVpFrozen = true )
inline

Retrieves layer traits.

Parameters
nVpId[in] Viewport ID for viewport-dependent layer nodes.
bVpFrozen[in] Take viewport-frozen layer frags into account.

Definition at line 302 of file GsLayerNode.h.

◆ layerTraits() [2/2]

const OdGiLayerTraitsData & OdGsLayerNode::layerTraits ( OdUInt32 nVpId,
bool bVpFrozen = true ) const
inline

Retrieves layer traits by the passed viewport identifier.

Parameters
nVpId[in] Viewport ID for viewport-dependent layer nodes.
bVpFrozen[in] Take viewport-frozen layer frags into account.

Definition at line 307 of file GsLayerNode.h.

◆ loadNodeState()

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

Restores node state from filer object.

Parameters
pFiler[in] Pointer to a filer object. Filer object.
pVectorizer[in] Pointer to a vectorizer. May be needed to load vectorizer client metafile (cache).
Returns
true if node state is successfully loaded, false otherwise.

Reimplemented from OdGsNode.

◆ nodeType()

virtual ENodeType OdGsLayerNode::nodeType ( ) const
inlinevirtual

Retrieves a node type of this object.

Implements OdGsNode.

Definition at line 191 of file GsLayerNode.h.

◆ ODRX_DECLARE_MEMBERS()

OdGsLayerNode::ODRX_DECLARE_MEMBERS ( OdGsLayerNode )

◆ propagateLayerChanges()

void OdGsLayerNode::propagateLayerChanges ( OdGsViewImpl & view)
protectedvirtual

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

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

Implements OdGsNode.

◆ reserveLayerTraits()

void OdGsLayerNode::reserveLayerTraits ( OdUInt32 nVpId)

◆ saveNodeState()

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

Stores current state of this layer node into filer object.

Parameters
pFiler[out] Pointer to a filer object.
pVectorizer[in/out] Pointer to a vectorizer. May be needed to save vectorizer client metafile (cache).
Returns
true if node state is successfully saved, false otherwise.

Reimplemented from OdGsNode.

◆ setCacheUpToDate()

void OdGsLayerNode::setCacheUpToDate ( OdUInt32 nVpId)

Specifies that cache of this layer node is valid.

Parameters
nVpId[in] Viewport ID for viewport-dependent layer nodes.

◆ setDirty()

void OdGsLayerNode::setDirty ( bool bDirty)
inline

Definition at line 274 of file GsLayerNode.h.

◆ update() [1/2]

virtual void OdGsLayerNode::update ( OdGsBaseVectorizer & view)
virtual

Updates this layer node.

Parameters
view[in] Vectorizer view.

◆ update() [2/2]

void OdGsLayerNode::update ( OdGsUpdateContext & ctx,
OdGsContainerNode * pParent,
OdSiSpatialIndex * pParentIndex )
protectedvirtual

Updates this container node. Does nothing in default implementation.

Parameters
ctx[in] GS update context.
pParent[in] Pointer to a parent container node.
pParentIndex[in] Pointer to a parent spatial index.

Implements OdGsNode.

◆ updateVpFrozen()

void OdGsLayerNode::updateVpFrozen ( OdGsViewImpl * pView)
protected

Updates the viewport-frozen flag state of this layer node. If this layer is not visible for one of the views in an associated base model, the kVpFrozen flag for this layer node is set to true.

Parameters
view[in] Implementation view object. Not used.

Friends And Related Symbol Documentation

◆ OdGsBaseModel

friend class OdGsBaseModel
friend

Definition at line 102 of file GsLayerNode.h.

◆ OdGsEmptyMetafileCache

friend class OdGsEmptyMetafileCache
friend

Definition at line 262 of file GsLayerNode.h.

Member Data Documentation

◆ m_layerTraits

OdGiLayerTraitsData OdGsLayerNode::m_layerTraits
protected

Definition at line 98 of file GsLayerNode.h.

◆ m_pNextChanged

OdGsLayerNode* OdGsLayerNode::m_pNextChanged
protected

Definition at line 103 of file GsLayerNode.h.

◆ m_vpFrozenTraits

OdGiLayerTraitsDataArray OdGsLayerNode::m_vpFrozenTraits
mutableprotected

Definition at line 100 of file GsLayerNode.h.

◆ m_vpLayerTraits

OdGiLayerTraitsDataArray OdGsLayerNode::m_vpLayerTraits
mutableprotected

Definition at line 99 of file GsLayerNode.h.


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