24#ifndef __OD_GS_BLOCKREFERENCE_NODE__
25#define __OD_GS_BLOCKREFERENCE_NODE__
32class OdGsSpQueryContext;
44 m_worldToModel(NULL), m_modelToWorld(NULL){}
85 std::unique_ptr<OdSiShape> m_transformedQuery;
116class WorldDrawBlockRef;
117class OdGsUpdateState;
132 kChildrenNotUpToDate = 0x80000000
138 void clear() { m_vpAwareFlags.clear(); }
139 bool isEmpty()
const {
return m_vpAwareFlags.isEmpty(); }
145 {
return nVpID < m_vpAwareFlags.size(); }
163 void*
operator new(size_t);
164 void operator delete(
void*);
173 if (!(--m_nRefCounter))
176 long numRefs()
const {
return m_nRefCounter; }
185 virtual void display(OdGsDisplayContext& ctx,
bool isHighlightedAll) = 0;
243 kLastFlag = kForceNotEmpty
302 void clearBlockNode();
340 if(!childrenUpToDate(nVpID))
343 if( nAF == 0xFFFFFFFF || (baseModel()->viewChanges(nVpID) & nAF) != 0 )
353 bool bEnableSharedGraphics);
364 if(!m_pImpl.get() || !m_pImpl->isSharedReference())
366 return getSharedImpl(view);
373 void createImpl(
const OdGsUpdateContext& ctx,
bool bTryShared);
374 void drawBlockImpl(OdGsUpdateContext& ctx,
const OdGiDrawable* pBlockTableRecord,
376 bool bEnableSharedGraphics);
380 void clearImpl() { m_pImpl = NULL; }
381 bool validateSharedRefImpl(
const OdGsUpdateContext &ctx,
bool &bTryShared);
391 friend class WorldDrawBlockRef;
392 friend class GsDrawableNested;
393 friend class OdGsSpQueryContext;
426 const OdGiDrawable* pBlockTableRecord,
unsigned iInstance);
455 m_nodeImp(c.m_nodeImp), m_pFirstAttrib(c.m_pFirstAttrib){}
486 void clearParams() {m_nCols = m_nRows = 0; m_sx = m_sy = 0.; m_blockTf.setToIdentity(); }
bool operator!=(T left, const OdGiVariant::EnumType right)
bool operator==(T left, const OdGiVariant::EnumType right)
OdSiRecursiveVisitor OdSiSelBaseVisitor
OdSiRecursiveVisitorTf OdSiSelectVisitorTf
#define GS_TOOLKIT_EXPORT
#define SETBIT(flags, bit, value)
#define GETBIT(flags, bit)
void setChildrenUpToDate(bool childrenUpToDate, const OdUInt32 nVpID)
OdUInt32 get(OdUInt32 nVpID) const
bool areInvalid(OdUInt32 nVpID) const
void set(OdUInt32 nVpID, OdUInt32 flags)
bool findFlag(OdUInt32 nVpID) const
bool childrenUpToDate(OdUInt32 nVpID) const
OdUInt32 numAwareFlags() const
static void actionCheckCancelledSharedRef(void *pObj, OdGsUpdateState &state)
virtual bool getSharedTransform(OdGeMatrix3d &transform) const
static void actionAddEntPropsFromState(void *pObj, OdGsUpdateState &state)
void checkCancelledSharedRef(OdGsUpdateState &state)
virtual void destroySubitems()
void updateBlockNode(const OdGiDrawable *pBlockTableRecord)
virtual bool doSelect(OdGsBaseVectorizer &vect, OdGiDrawable *pDrw, OdSiSelBaseVisitor *pVisitor, OdGsView::SelectionMode mode)
virtual void setChildrenUpToDate(bool childrenUpToDate, const OdUInt32 nVpID)
void setAwareFlags(OdUInt32 viewportId, OdUInt32 nAwareFlags)
void initBlockNode(const OdGiDrawable *pBlock)
void updateImpl(OdGsUpdateContext &ctx, const OdGiDrawable *pInsert, OdSiSpatialIndex *pParentIndex)
void addEntPropsFromState(const OdGsUpdateState &state)
virtual void propagateLayerChangesStock()
virtual void invalidate(OdGsContainerNode *pParent, OdGsViewImpl *pView, OdUInt32 mask)
~OdGsBlockReferenceNode()
void * sharedDefinition(const OdGsViewImpl &view)
void postUpdateStep(OdGsUpdateState &state)
virtual bool isMInsert() const
virtual OdUInt32 awareFlags(OdUInt32 viewportId) const
virtual void update(OdGsUpdateContext &ctx, OdGsContainerNode *pParent, OdSiSpatialIndex *pParentIndex)
virtual OdGsEntityNode * firstAttrib()
void setForceNotEmpty(bool b)
virtual OdGsEntityNode * firstEntity()
bool loadClientNodeState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer)
bool excludeFromViewExt() const
OdGsBlockNode * blockNode() const
virtual bool isSelfReferential() const
OdGsBlockReferenceNodeImpl * getImpl(const OdGsViewImpl &view)
bool needRegen(OdUInt32 nVpID) const
virtual bool isReference() const
virtual void releaseStock()
static void actionRestartLocked(void *pObj, OdGsUpdateContext &ctx)
bool postprocessNodeLoading(OdGsFiler *pFiler)
OdGsBlockReferenceNode(OdGsBaseModel *pModel, const OdGiDrawable *pDrawable, bool bSetGsNode=false)
bool isForceNotEmpty() const
OdGsBlockNode * m_pBlockNode
bool saveClientNodeState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer) const
virtual void doUpdateImpl(OdGsUpdateContext &ctx, const OdGiDrawable *pBlockTableRecord, unsigned iInstance)
virtual bool childrenRegenDraw(OdUInt32 nVpID) const
void setMetafile(OdGsUpdateContext &ctx, OdGsEntityNode::Metafile *pMf, OdUInt32 awareFlags, const OdGeExtents3d &ext)
TPtr< OdGsBlockReferenceNodeImpl > m_pImpl
virtual bool awareFlagsAreInvalid(OdUInt32 viewportId) const
virtual bool childrenUpToDate(OdUInt32 nVpID) const
virtual void playAsGeometry(OdGsBaseVectorizer &view, EMetafilePlayMode eMode)
static OdGsBlockReferenceNode * create(OdGsBaseModel *pModel, const OdGiDrawable *pDrawable)
void setExcludeFromViewExt(bool bSet)
void drawBlock(OdGsUpdateContext &ctx, const OdGiDrawable *pBlockTableRecord, OdGsBlockReferenceNodeImpl *pContainer, bool bEnableSharedGraphics)
OdGsEntityNode * m_pFirstAttrib
ODRX_DECLARE_MEMBERS(OdGsBlockReferenceNode)
static void actionPostUpdateStep(void *pObj, OdGsUpdateState &state)
virtual void propagateLayerChanges(OdGsViewImpl &view)
virtual void spatialQuery(const OdGsView &view, OdSiRecursiveVisitor *pVisitor)
virtual void doDisplay(OdGsDisplayContext &ctx)
bool highlightSubnodes(OdUInt32 nSubnodes, bool bHighlight, bool bAll)
virtual bool select(OdGsBaseVectorizer &view, OdSiSelBaseVisitor *, OdGsView::SelectionMode mode)
virtual void doSpatialQuery(OdGsSpQueryContext &ctx)
void updateAttribute(OdGsUpdateContext &ctx, OdGsEntityNode *pNode, const OdGiDrawable *pInsert, OdGsMarker marker)
virtual bool layersChanged(OdGsViewImpl &view) const
virtual void propagateLayerChangesStock()=0
virtual void playAsGeometry(OdGsBaseVectorizer &view, EMetafilePlayMode eMode)=0
virtual void makeStock()=0
virtual bool layersChanged(OdGsViewImpl &view) const
virtual void doSpatialQuery(OdGsSpQueryContext &ctx)=0
virtual bool saveNodeImplState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer) const =0
virtual void display(OdGsDisplayContext &ctx, bool isHighlightedAll)=0
virtual bool isSharedDefinition() const
virtual ~OdGsBlockReferenceNodeImpl()
virtual OdGsEntityNode * firstEntity()=0
virtual void highlight(bool bDoIt, bool bWholeBranch, OdUInt32 nSelStyle=0)=0
virtual void postprocessNodeImplLoading(OdGsFiler *)
virtual void updateSubitems(OdGsUpdateContext &ctx, OdGsBlockNode &blockNode, const OdGiDrawable *pBlock)=0
virtual bool destroySubitems()=0
OdRefCounter m_nRefCounter
OdGsBlockReferenceNodeImpl()
virtual bool isSharedReference() const
virtual bool invalidate(OdGsContainerNode *pParent, OdGsViewImpl *pView, OdUInt32 mask)=0
virtual bool loadNodeImplState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer, OdGsBaseModel *pModel)=0
virtual void releaseStock()=0
virtual bool select(OdGsBaseVectorizer &view, OdSiSelBaseVisitor *pVisitor, bool bHasExtents, OdGsView::SelectionMode mode)=0
Collection(const Collection &c)
TPtr< OdGsBlockReferenceNodeImpl > m_nodeImp
OdGsBlockReferenceNodeImpl * imp()
CollectionItem(const CollectionItem &c)
OdGsEntityNode * firstAttrib()
const OdGsEntityNode * firstAttrib() const
OdGsEntityNode * m_pFirstAttrib
void copyFrom(const CollectionItem &c)
const OdGsBlockReferenceNodeImpl * imp() const
virtual bool layersChanged(OdGsViewImpl &view) const
bool saveClientNodeState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer) const
CollectionItem * item(unsigned iInstance)
bool loadClientNodeState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer)
virtual void doUpdateImpl(OdGsUpdateContext &ctx, const OdGiDrawable *pBlockTableRecord, unsigned iInstance)
virtual bool isMInsert() const
OdGeMatrix3d m_xModelToWorld
virtual void doDisplay(OdGsDisplayContext &ctx)
virtual void highlight(bool bDoIt, bool bWholeBranch, OdUInt32 nSelStyle=0)
static void actionStretchExtents(void *pObj, OdGsUpdateState &state)
bool postprocessNodeLoading(OdGsFiler *pFiler)
ODRX_DECLARE_MEMBERS(OdGsMInsertBlockNode)
virtual void destroySubitems()
OdGsMInsertBlockNode(OdGsBaseModel *pModel, const OdGiDrawable *pInsert, bool bSetGsNode=false)
virtual void releaseStock()
bool selectSubitems(OdGsBaseVectorizer &view, OdSiSelBaseVisitor *pVisitor, OdGsView::SelectionMode mode)
OdGsEntityNode *& firstAttrib(unsigned iInstance)
OdGsBlockReferenceNodeImpl * getImpl(unsigned iInstance)
void setParams(const OdGeMatrix3d &blockTf, int nCols, int nRows, double sx, double sy)
Collection * m_pCollectionImpl
virtual OdGsEntityNode * firstEntity()
bool selectAttributes(OdGsBaseVectorizer &view)
virtual void invalidate(OdGsContainerNode *pParent, OdGsViewImpl *pView, OdUInt32 mask)
virtual void propagateLayerChangesStock()
virtual void playAsGeometry(OdGsBaseVectorizer &view, EMetafilePlayMode eMode)
virtual OdGsEntityNode * firstAttrib()
virtual bool doSelect(OdGsBaseVectorizer &vect, OdGiDrawable *pDrw, OdSiSelBaseVisitor *pVisitor, OdGsView::SelectionMode mode)
OdGsSpQueryContextTf(OdSiRecursiveVisitor &v, const OdGeMatrix3d &objectTf, const OdGeMatrix3d &objectTfInv, const OdGeScale3d &scale)
OdGeMatrix3d m_worldToModel
const OdGeMatrix3d * m_prevWorldToNode
const OdGeMatrix3d * m_prevWorldToModel
OdGeMatrix3d m_worldToNode
OdGeMatrix3d m_modelToWorld
const OdGeMatrix3d * m_prevModelToWorld
const OdGeMatrix3d * m_prevNodeToWorld
OdGeMatrix3d m_nodeToWorld
const OdGeMatrix3d * m_worldToNode
const OdGeMatrix3d * nodeToWorld() const
const OdGeMatrix3d * m_worldToModel
const OdGeMatrix3d * worldToNode() const
const OdGeMatrix3d * worldToModel() const
void setModelToWorld(const OdGeMatrix3d *tf)
const OdSiShape * query() const
void resetQuery(const OdSiShape *pQuery)
const OdGeMatrix3d * m_modelToWorld
void setWorldToModel(const OdGeMatrix3d *tf)
void setNodeToWorld(const OdGeMatrix3d *tf)
const OdGeMatrix3d * m_nodeToWorld
const OdSiShape * m_pQuery
const OdGeMatrix3d * modelToWorld() const
void setWorldToNode(const OdGeMatrix3d *tf)
OdSiRecursiveVisitor & m_visitor
~OdSiRecursiveVisitorTf()
OdSiRecursiveVisitorTf(OdSiRecursiveVisitor &v, const OdGeMatrix3d &mat)