24#ifndef __OD_GS_ENTITY_NODE__
25#define __OD_GS_ENTITY_NODE__
91 pPortion = pNextPortion;
112 m_pNext->filterEmptyNestedPortions();
136 struct NextEntityEntry
145 void allocNextEntityArray(
OdUInt32 nMaxVpId);
150 inline NextEntityEntry *firstEntEntry() {
return reinterpret_cast<NextEntityEntry*
>(m_pNextEntity); }
155 inline const NextEntityEntry *firstEntEntry()
const {
return reinterpret_cast<const NextEntityEntry*
>(m_pNextEntity); }
162 inline NextEntityEntry *nextEntEntry(
OdUInt32 nVpId) { checkEntEntry(nVpId);
return reinterpret_cast<NextEntityEntry*
>(m_pNextEntity) + (nVpId + 1); }
168 inline const NextEntityEntry *nextEntEntry(
OdUInt32 nVpId)
const { checkEntEntry(nVpId);
return reinterpret_cast<const NextEntityEntry*
>(m_pNextEntity) + (nVpId + 1); }
178 void*
operator new(size_t);
179 void operator delete(
void *);
328 static void*
Realloc(
void* pMemBlock,
size_t newSize,
size_t)
395 getArray() = const_cast<MetafileHolder&>(c).getArray();
399 *reinterpret_cast<Metafile**>(rawPtr()) = const_cast<MetafileHolder&>(c).get();
559 return (!pMetafile.
isNull()) ? pMetafile->m_nAwareFlags : 0;
590#ifdef TD_STRICT_ALIGNMENT
591#if defined(_MSC_VER) && (_MSC_VER < 1900)
597#if defined(_MSC_VER) && (_MSC_VER < 1900)
861 virtual bool isLight()
const {
return false; }
1005 ODA_ASSERT(threadIndex >= 0 && threadIndex < 31);
1117 void hide(
bool bDoIt,
bool bSelectable =
false,
bool bWholeBranch =
true);
1289 volatile int m_markToSkipFlags;
1321 m_pNextEntity = pNextEntity;
1327 nextEntEntry(nVpId)->m_pNextEntity = pNextEntity;
1329 m_pNextEntity = pNextEntity;
1334 if (nMaxVpId == 0xFFFFFFFF) nMaxVpId = 0;
1336 allocNextEntityArray(nMaxVpId);
1343 return m_pNextEntity;
1349 return nextEntEntry(nVpId)->m_pNextEntity;
1352 return m_pNextEntity;
1359 return m_pNextEntity;
1365 return nextEntEntry(nVpId)->m_pNextEntity;
1368 return m_pNextEntity;
1392#ifndef TD_SINGLE_THREAD
1393 return (
mask & OdInterlockedExchangeAdd(&m_markToSkipFlags, 0)) != 0;
1406#ifndef TD_SINGLE_THREAD
1408 OdInterlockedExchangeAdd(&m_markToSkipFlags,
mask);
1410 OdInterlockedExchangeAdd(&m_markToSkipFlags, -(
int)
mask);
1505#define VPMETAFILEHOLDERARRAY_DESTRUCTOR ~MetafilePtrArray
1569 if(ptr->m_pGsMetafile.get())
1648 while (pCurBranch && (branchType > pCurBranch->type()))
1650 if (pCurBranch && (pCurBranch->type() == branchType))
1652 if (pCurBranch == pBr)
1655 pCurBranch->setNextTypeOfBranch(NULL);
1674 while (pCurBranch && (branchType > pCurBranch->type()))
1676 if (pCurBranch && (pCurBranch->type() == branchType))
1682 pCurBranch->setNextTypeOfBranch(NULL);
1694 if (pCurBranch->
type() == branchType)
1696 if (pCurBranch->
type() > branchType)
1700 }
while (pCurBranch);
1711 if (pCurBranch->
type() == branchType)
1713 if (pCurBranch->
type() > branchType)
1717 }
while (pCurBranch);
GE_TOOLKIT_EXPORT OdGeDoubleArray & getArray(OdGeKnotVector *p)
@ kOdGiHideOrShadeCommand
OdSmartPtr< OdGsEntityNode > OdGsEntityNodePtr
OdArray< OdGsEntityNode *, OdMemoryAllocator< OdGsEntityNode * > > OdGsEntityNodeArray
#define GS_TOOLKIT_EXPORT
TPtr< OdGsStateBranch > OdGsStateBranchPtr
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
T & at(size_type arrayIndex)
void resize(size_type logicalLength, const T &value)
OdArrayMemAlloc(size_type physicalLength, int growLength=8)
friend class OdGsModuleObject
virtual bool isLight() const
MetafilePtrArray & metafileArray()
void setEntityUnerased(bool flag)
void setMarkedByUpdateManager(bool marked)
bool markedAsNonSelectable() const
bool markedByUpdateManager() const
OdGsEntityNode::MetafilePtr metafileAt(int metafileIndex) const
virtual bool hasFrozenLayers()
void invalidate(OdGsContainerNode *pParent, OdGsViewImpl *pView, OdUInt32 mask)
void addMaxLineweightUsed(OdDb::LineWeight lwd)
bool skipDisplayClipping() const
void update(OdGsUpdateContext &ctx, OdGsContainerNode *pParent, OdSiSpatialIndex *pParentIndex)
void setMetafile(OdGsUpdateContext &ctx, OdGsEntityNode::Metafile *metafiles)
void setExtentsOutOfModelSpace(bool flag)
virtual bool isSelfReferential() const
virtual ENodeType nodeType() const
OdGsEntityNode::MetafilePtr metafile() const
bool extents(const OdGsView *pView, OdGeExtents3d &ext) const
void select(OdGsBaseVectorizer &view)
OdRxObject * findFirstGsMetafile(const OdGsViewImpl &view, bool *bContainsNested=nullptr, MetafileCompatibilityLevel findCompatibleLevel=kSkipCheckCompatible)
ODRX_DECLARE_MEMBERS(OdGsEntityNode)
void setAsLightSourceOwner(bool bSet)
OdUInt32 numNextEntity() const
static OdGsEntityNode::MetafilePtr getEmptyMetafile(OdUInt32 flags, OdGsLayerNode *pLayerNode=NULL)
void resetInvalidVpFlag()
void enableMultipleNextEntities(OdUInt32 nMaxVpId)
bool entityUnerased() const
OdGsEntityNode(OdGsBaseModel *pModel, const OdGiDrawable *pUnderlyingDrawable, bool bSetGsNode=false)
static void Free(void *pMemBlock)
MetafileCompatibilityLevel
bool isMarkedErased() const
bool isExtentsOutOfModelSpace() const
virtual void releaseStock()
void transformExtents(OdGeExtents3d &ext, const OdGsStateBranch *pTransformBr=NULL, bool bInverse=false) const
void setMaxLineweightUsed(OdDb::LineWeight lwd)
void setExtentsFromMetafiles()
void display(OdGsDisplayContext &ctx)
virtual void propagateLayerChangesStock()
virtual bool isReference() const
virtual void playAsGeometry(OdGsBaseVectorizer &view, EMetafilePlayMode eMode)
void setRegenOnDraw(bool val)
void setInWorkset(bool val)
OdSmartPtr< Metafile > MetafilePtr
void markAsNonSelectable(bool val)
void setStateBranch(OdGsStateBranch *pBr)
friend class OdGsBlockReferenceNode
bool hasAnyStateBranch() const
static unsigned markToSkipMask(OdUInt32 threadIndex)
bool loadNodeState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL)
void setSkipDisplayClipping(bool bOn)
OdGsStateBranchPtr m_stateBranch
bool isSingleThreaded() const
const OdGeExtents3d & extents() const
virtual void propagateLayerChanges(OdGsViewImpl &view)
bool isMetafilesCompatible(const OdGsViewImpl *pView1, const OdGsViewImpl *pView2, OdGsUpdateContext *ctx)
bool isMarkedSkipSelection() const
bool saveNodeState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL) const
virtual OdUInt32 awareFlags(OdUInt32 viewportId) const
void setOwned(bool owned)
MetafileHolder m_metafile
bool extents(OdGeExtents3d &extents) const
void convertToViewportDependent(const OdGsUpdateContext &ctx)
void resetStateBranch(OdGsStateBranch::BranchType branchType=OdGsStateBranch::kHighlightingBranch)
void addContentToUpdateManager(OdUInt32 viewportId, OdGsUpdateManager *pManager, const UpdateManagerContext &context)
void updateVisible(OdGsViewImpl *pViewImpl)
void markToSkip(unsigned mask, bool markToSkip)
bool isRequireRegenOnHighlightChange() const
void setMetafileAt(int metafileIndex, OdGsEntityNode::Metafile *pMetafile)
void setMetafile(OdGsEntityNode::Metafile *metafiles)
virtual bool layersChanged(OdGsViewImpl &view) const
bool findMetafileInStock(OdGsUpdateContext &ctx)
OdGsStateBranch * stateBranch(OdGsStateBranch::BranchType branchType=OdGsStateBranch::kHighlightingBranch)
void setSpatiallyIndexed(bool spatiallyIndexed)
bool spatiallyIndexed() const
OdGsEntityNode * nextEntity()
void setNextEntity(OdGsEntityNode *pNextEntity)
bool isLightSourceOwner() const
void setSingleThreaded(bool val)
OdGsEntityNode::Metafile * metafile(const OdGsViewImpl &view, OdGsUpdateContext *ctx, MetafileCompatibilityLevel findCompatibleLevel=kFindCompatible)
void markSkipSelection(bool val)
OdDb::LineWeight getMaxLineweightUsed() const
void insertToSpatialIndex(OdUInt32 nVpId, OdSiSpatialIndex &parentIndex, const OdGeExtents3d &prevExtents)
bool isRegenOnDraw() const
static void * Alloc(size_t nBytes)
bool markedToSkip(unsigned mask)
virtual void highlight(bool bDoIt, bool bWholeBranch, OdUInt32 nSelStyle=0)
virtual OdGsEntityNode::MetafilePtr regenMetafile(OdGsUpdateContext &ctx, OdUInt32 vpDepFlags)
void hide(bool bDoIt, bool bSelectable=false, bool bWholeBranch=true)
static void * Realloc(void *pMemBlock, size_t newSize, size_t)
OdRxObject * findCompatibleCache(const OdGsViewImpl &keyView, OdGsUpdateContext *ctx, OdUInt32 awareMask=0)
void markErased(bool val)
friend class OdGsViewImpl
virtual void highlight(bool bDoIt, bool bWholeBranch, OdUInt32 nSelStyle=0)
virtual OdDb::LineWeight getMaxLineweightUsed() const
friend class OdGsBaseModel
virtual bool extents(const OdGsView *pView, OdGeExtents3d &ext) const
void setInvalidVp(bool val)
virtual void hide(bool bDoIt, bool bSelectable=false, bool bWholeBranch=true)
static GS_STATIC_EXPORT AllocatorArray s_aAlloc
OdGsNode(OdGsBaseModel *pModel, const OdGiDrawable *pUnderlyingDrawable)
OdGsStateBranch * nextTypeOfBranch()
void setNextTypeOfBranch(OdGsStateBranch *pNext)
OdGsStateBranchReactor * reactor()
virtual void onBranchDetach(const OdGsCache *pGsNode, OdGsStateBranch *pStateBranch)=0
OdGsUpdateManagerElement()
bool ODSI_API properExtents(const OdGeExtents3d &ext)
void copyFrom(OdGsGeomPortion &c)
OdRxObjectPtr m_pGsMetafile
void filterEmptyNestedPortions()
bool isEmptyPortion() const
OdGsGeomPortion * m_pNext
void freeNestedPortions()