CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OdGsMaterialNode Class Reference

#include <GsMaterialNode.h>

Inheritance diagram for OdGsMaterialNode:
OdGsNode OdGsCache OdRxObject

Classes

struct  DataEntry
 

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdGsMaterialNode)
 
 OdGsMaterialNode (OdGsBaseModel *pModel, const OdGiDrawable *pUnderlyingDrawable, bool bSetGsNode=true)
 
 ~OdGsMaterialNode ()
 
void destroy ()
 
OdGiMaterialTraitsDatamaterialTraits ()
 
const OdGiMaterialTraitsDatamaterialTraits () const
 
virtual void onModified (OdGsBaseVectorizer &view)
 
void invalidate (OdGsContainerNode *pParent, OdGsViewImpl *pView, OdUInt32 mask)
 
void invalidateModule (const void *pModule)
 
virtual void update (OdGsBaseVectorizer &view)
 
OdGsMaterialNodenextNode () const
 
OdGsMaterialNodeprevNode () const
 
OdGsMaterialNodesetNextNode (OdGsMaterialNode *newNode)
 
OdGsMaterialNodesetPrevNode (OdGsMaterialNode *newNode)
 
bool isDataModified () const
 
bool isCachedDataModified (OdGsBaseVectorizer &view) const
 
void setCachedDataUpdated (OdGsBaseVectorizer &view)
 
const OdRxObjectcachedData (OdGsBaseVectorizer &view) const
 
void setCachedData (OdGsBaseVectorizer &view, OdRxObject *newCachedData)
 
OdMutexPtrcacheMutex ()
 
virtual ENodeType nodeType () 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 ()
 
 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

typedef std::map< const void *, DataEntryCacheMap
 
- 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 }
 

Protected Member Functions

void update (OdGsUpdateContext &ctx, OdGsContainerNode *pParent, OdSiSpatialIndex *pParentIndex)
 
void display (OdGsDisplayContext &ctx)
 
bool extents (OdGeExtents3d &) const
 
virtual void propagateLayerChanges (OdGsViewImpl &view)
 
- 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

OdGiMaterialTraitsData m_materialTraits
 
bool m_dataInitialized
 
bool m_dataModified
 
CacheMap m_cacheMap
 
OdMutexPtr m_pCacheMutex
 
OdGsMaterialNodem_pMatPrev
 
OdGsMaterialNodem_pMatNext
 
- Protected Attributes inherited from OdGsNode
OdGsNodem_pPrev
 
OdGsNodem_pNext
 
OdGsBaseModelm_pModel
 
voidm_underlyingDrawable
 
OdUInt32 m_flags
 
OdUInt32 m_userFlags
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Static Protected Attributes inherited from OdGsNode
static GS_STATIC_EXPORT AllocatorArray s_aAlloc
 

Detailed Description

<group OdGs_Classes>

Definition at line 49 of file GsMaterialNode.h.

Member Typedef Documentation

◆ CacheMap

typedef std::map<const void *, DataEntry> OdGsMaterialNode::CacheMap
protected

Data type that represents a cache map.

Definition at line 111 of file GsMaterialNode.h.

Constructor & Destructor Documentation

◆ OdGsMaterialNode()

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

Constructor for the OdGsMaterialNode 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.

◆ ~OdGsMaterialNode()

OdGsMaterialNode::~OdGsMaterialNode ( )

Destructor for the OdGsMaterialNode class.

Member Function Documentation

◆ cachedData()

const OdRxObject * OdGsMaterialNode::cachedData ( OdGsBaseVectorizer view) const

Retrieves pointer to the material cache data object.

Parameters
view[in] Vectorizer view.

◆ cacheMutex()

OdMutexPtr & OdGsMaterialNode::cacheMutex ( )
inline

Retrieves cache mutex.

Definition at line 257 of file GsMaterialNode.h.

◆ destroy()

void OdGsMaterialNode::destroy ( )
inlinevirtual

Implements OdGsNode.

Definition at line 149 of file GsMaterialNode.h.

◆ display()

void OdGsMaterialNode::display ( OdGsDisplayContext &  ctx)
protectedvirtual

No operation.

Implements OdGsNode.

◆ extents()

bool OdGsMaterialNode::extents ( OdGeExtents3d ) const
protectedvirtual

No operation.

Implements OdGsCache.

◆ invalidate()

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

No operation.

Implements OdGsNode.

◆ invalidateModule()

void OdGsMaterialNode::invalidateModule ( const void pModule)

Erases cache map for the passed module.

Parameters
pModule[in] Pointer to a module for which to erase a cache map.

◆ isCachedDataModified()

bool OdGsMaterialNode::isCachedDataModified ( OdGsBaseVectorizer view) const

Checks whether cached material data is modified for this object.

Returns
true if cached data has been modified, false otherwise.

◆ isDataModified()

bool OdGsMaterialNode::isDataModified ( ) const

Checks whether material data is modified for this object.

Returns
true if data has been modified, false otherwise.

◆ loadNodeState()

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

Loads current node state from filer object.

Parameters
pFiler[in] Filer object.
pVectorizer[in] Pointer to a vectorizer. May be required for saving client node state.
Returns
true state of this node is successfully loaded, false otherwise.

Reimplemented from OdGsNode.

◆ materialTraits() [1/2]

OdGiMaterialTraitsData & OdGsMaterialNode::materialTraits ( )

Retrieves material traits associated with this material node.

◆ materialTraits() [2/2]

const OdGiMaterialTraitsData & OdGsMaterialNode::materialTraits ( ) const

Retrieves material traits associated with this material node.

◆ nextNode()

OdGsMaterialNode * OdGsMaterialNode::nextNode ( ) const

Retrieves a pointer to the next material node.

◆ nodeType()

virtual ENodeType OdGsMaterialNode::nodeType ( ) const
inlinevirtual

Retrieves node type of this object.

Returns
kMaterialNode.

Implements OdGsNode.

Definition at line 265 of file GsMaterialNode.h.

◆ ODRX_DECLARE_MEMBERS()

OdGsMaterialNode::ODRX_DECLARE_MEMBERS ( OdGsMaterialNode  )

◆ onModified()

virtual void OdGsMaterialNode::onModified ( OdGsBaseVectorizer view)
virtual

Notification method called from OdGsNode if material data changed at update. May be used by inherited nodes to update device-dependent information.

Parameters
view[in] Vectorizer view.

◆ prevNode()

OdGsMaterialNode * OdGsMaterialNode::prevNode ( ) const

Retrieves a pointer to the previous material node.

◆ propagateLayerChanges()

virtual void OdGsMaterialNode::propagateLayerChanges ( OdGsViewImpl view)
protectedvirtual

No operation.

Implements OdGsNode.

◆ saveNodeState()

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

Stores current node state into filer object.

Parameters
pFiler[in] Filer object.
pVectorizer[in] Pointer to a vectorizer. May be required for saving client node state.
Returns
true state of this node is successfully saved, false otherwise.

Reimplemented from OdGsNode.

◆ setCachedData()

void OdGsMaterialNode::setCachedData ( OdGsBaseVectorizer view,
OdRxObject newCachedData 
)

Sets material cache data for the passed view.

Parameters
view[in] Vectorizer view.
newCachedData[in] Cache data to set.

◆ setCachedDataUpdated()

void OdGsMaterialNode::setCachedDataUpdated ( OdGsBaseVectorizer view)

Specifies that cached data of the passed view's module is updated (not modified in other words).

Parameters
view[in] Vectorizer view.

◆ setNextNode()

OdGsMaterialNode * OdGsMaterialNode::setNextNode ( OdGsMaterialNode newNode)

Sets the next material node.

Parameters
newNode[in] Pointer to new material node.
Returns
pointer to the currently next material node that is replaced with new passed material node.

◆ setPrevNode()

OdGsMaterialNode * OdGsMaterialNode::setPrevNode ( OdGsMaterialNode newNode)

Sets the previous material node.

Parameters
newNode[in] Pointer to new material node.
Returns
pointer to the currently previous material node that is replaced with new passed material node.

◆ update() [1/2]

virtual void OdGsMaterialNode::update ( OdGsBaseVectorizer view)
virtual

Updates this material node.

Parameters
view[in] Vectorizer view.

◆ update() [2/2]

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

No operation.

Implements OdGsNode.

Member Data Documentation

◆ m_cacheMap

CacheMap OdGsMaterialNode::m_cacheMap
protected

Cache map.

Definition at line 116 of file GsMaterialNode.h.

◆ m_dataInitialized

bool OdGsMaterialNode::m_dataInitialized
protected

Flag that shows whether data is initialized.

Definition at line 81 of file GsMaterialNode.h.

◆ m_dataModified

bool OdGsMaterialNode::m_dataModified
protected

Flag that shows whether data is modified.

Definition at line 86 of file GsMaterialNode.h.

◆ m_materialTraits

OdGiMaterialTraitsData OdGsMaterialNode::m_materialTraits
protected

Material traits.

Definition at line 76 of file GsMaterialNode.h.

◆ m_pCacheMutex

OdMutexPtr OdGsMaterialNode::m_pCacheMutex
protected

Cache mutex.

Definition at line 121 of file GsMaterialNode.h.

◆ m_pMatNext

OdGsMaterialNode* OdGsMaterialNode::m_pMatNext
mutableprotected

Pointer to next material node.

Definition at line 131 of file GsMaterialNode.h.

◆ m_pMatPrev

OdGsMaterialNode* OdGsMaterialNode::m_pMatPrev
mutableprotected

Pointer to previous material node.

Definition at line 126 of file GsMaterialNode.h.


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