24#ifndef __ODGSMODELIMPL_H__
25#define __ODGSMODELIMPL_H__
27#define OD_MATERIAL_CACHE_SUPPORTED
53#define CACHE_STATISTICS
60class OdGsBaseModelImpl;
120#ifdef BS_CHANGES_ENABLED
134 virtual void restoreAndAttach(
OdGiDrawable& db, OdRxObject* pFrom);
137#if defined(CACHE_STATISTICS)
154#ifdef BS_CHANGES_ENABLED
155 , kDisableAddNode = (1 << 10)
170#ifdef ODA_DIAGNOSTICS
175 typedef std::pair<OdGsViewImpl*, OdUInt32>
ViewRef;
177 typedef std::pair<const OdGsBaseModule*, OdUInt32>
ModuleRef;
251#ifdef BS_CHANGES_ENABLED
252 bool disableAddNode()
const {
return GETBIT(m_gsModelFlags, kDisableAddNode); }
529 bool bSelectHidden =
false,
const OdGsView* pView = NULL);
541 bool bSelectHidden =
false,
const OdGsView* pView = NULL);
735 double dTop,
double dBottom);
OdRxObject OdDbBaseDatabase
OdSmartPtr< OdGiDrawable > OdGiDrawablePtr
GS_TOOLKIT_EXPORT OdGiDrawablePtr fxOpenDrawable(OdGsBaseModel *, OdDbStub *)
#define GS_TOOLKIT_EXPORT
OdSmartPtr< OdGsMaterialCache > OdGsMaterialCachePtr
OdGiDrawablePtr(* OdGiOpenDrawableFn)(OdDbStub *id)
OdSmartPtr< OdGsBaseModelLocalIds > OdGsBaseModelLocalIdsPtr
OdArray< ViewProps > ViewPropsArray
#define SETBIT(flags, bit, value)
#define SETBIT_0(flags, bit)
#define GETBIT(flags, bit)
#define SETBIT_1(flags, bit)
OdGsNode * m_aNodes[kLastNodeType]
void removeModelReactor(OdGsModelReactor *pReactor)
OdGsCacheRedirectionManager * m_pRedirectionMgr
SelectionStyleRefMap m_selStyleRefs
bool supportSelectionStyles() const
virtual OdGsLayerNode * gsLayerNode(OdDbStub *layerId, const OdGsBaseVectorizer *pView)
virtual bool disableNotifications() const
void setRenderType(RenderType renderType)
friend class OdGsViewImpl
bool isLightsInBlocksEnabled() const
void invalidateSectionableBlocks()
OdDbStub * visualStyle() const
void onModifiedDrawable(OdGiDrawable *pDrawable, OdGiDrawable *pParent)
bool invalidVp(unsigned int viewportId) const
bool visualStyle(OdGiVisualStyle &visualStyle) const
SectioningSettings m_sectioning
const OdGiDrawable * visualStyleDrawable() const
OdGiDrawablePtr m_pTransVisualStyle
bool isSectioningEnabled() const
void setOpenDrawableFn(OdGiOpenDrawableFn openDrawableFn)
void invalidateRegenDrawBlocks(OdGsViewImpl &view, const OdDbStub *layoutId)
OdDbStub * m_modelBackground
virtual void externalTransform(const OdGiPathNode &path, const OdGsMarker *pMarkers, OdUInt32 nMarkers, bool bDoIt=true, const OdGsMatrixParam *xForm=NULL, const OdGsView *pView=NULL)
OdGiOpenDrawableFn m_openDrawableFn
virtual bool makeStock(OdDbStub *layoutId)
void invalidate(OdGsViewImpl &view, OdUInt32 mask)
void highlight(const OdGiPathNode &path, const OdGsMarker *pMarkers, OdUInt32 nMarkers, bool bDoIt=true, OdUInt32 nStyle=0, const OdGsView *pView=NULL)
void setEnableLinetypes(bool bEnable)
void setSelectable(bool bEnable)
virtual void hideImpl(const OdGiPathNode &path, const OdGsMarker *pMarkers, OdUInt32 nMarkers, bool bDoIt=true, bool bSelectHidden=false, const OdGsView *pView=NULL)
void onModified(OdGiDrawable *pModified, OdDbStub *parentID)
virtual void addNode(OdGsNode *pNode)
virtual void externalTransform(const OdGiPathNode &path, bool bDoIt=true, const OdGsMatrixParam *xForm=NULL, const OdGsView *pView=NULL)
virtual OdGsNode * newNode(ENodeType ntp, const OdGiDrawable *drawable, bool bSetGsNode)
SelectionStyleParamMap m_selStyleParam
OdVector< OdGsModelReactor *, OdMemoryAllocator< OdGsModelReactor * > > m_modelReactors
bool viewSectioningOverride() const
virtual void releaseStock(OdDbStub *layoutId)
virtual bool getExternalTransform(const OdGiPathNode &path, const OdGsMatrixParam *&xForm, const OdGsView *pView=NULL) const
OdDbStub * m_modelVisualStyle
void onModified(OdGiDrawable *pModified, OdGiDrawable *pParent)
void onPropertyModifiedImpl(OdGsBaseModelReactor::ModelProperty nProp, bool &bReturnValue)
OdGsMaterialCache * materialCache()
void setViewSectioningOverride(bool bEnable)
OdGsView::RenderMode renderModeOverride() const
OdArray< ViewProps > m_viewProps
virtual bool saveClientModelState(OdGsFiler *pFiler) const
void setSelectionStyleRef(const OdGsNode *pNode, OdUInt32 nStyle)
void setVisualStyle(const OdGiVisualStyle &visualStyle)
virtual bool isViewPropsValid(OdUInt32 viewportId) const
void onUnerased(OdGiDrawable *pUnerased, OdGiDrawable *pParent)
OdGsMaterialCachePtr m_pMaterialCache
virtual OdGsNode * gsNode(OdGiDrawable *pDrawable)
OdArray< ModuleRef, OdMemoryAllocator< ModuleRef > > m_modules
void extendSelStyleFlag(OdGsViewImpl *pView)
virtual void detach(OdGsNode *pNode)
friend class OdGsBaseVectorizer
void setEnableSectioning(bool bEnable)
virtual void invalidateEntRect(OdGsEntityNode *pNode, OdGsContainerNode *pParent, bool bForceIfNoExtents)
void hide(const OdGiPathNode &path, bool bDoIt=true, bool bSelectHidden=false, const OdGsView *pView=NULL)
void setRenderModeOverride(OdGsView::RenderMode mode=OdGsView::kNone)
OdArray< ViewRef, OdMemoryAllocator< ViewRef > > m_views
void invalidate(InvalidationHint hint)
friend GS_TOOLKIT_EXPORT OdGiDrawablePtr fxOpenDrawable(OdGsBaseModel *, OdDbStub *)
void onUnerased(OdGiDrawable *pUnerased, OdDbStub *parentID)
std::map< const OdGsNode *, OdUInt32 > SelectionStyleRefMap
OdGsBaseModelImpl * impl()
virtual OdUInt32 getMaxLocalViewportId() const
friend class CFxGsExtension
virtual void clearChangedLayersList()
bool isLinetypesEnabled() const
OdGsBaseModelImpl * m_impl
friend class OdGsBaseVectorizeDevice
const SectioningSettings & getSectioning() const
const ViewPropsArray & getViewProps() const
void onModifiedNode(OdGsNode *pCache, OdGiDrawable *pDrawable, OdGiDrawable *pParent)
virtual void invalidateEntRect(OdGiDrawable *pDrawable, OdGiDrawable *pParent, bool bForceIfNoExtents=false)
OdGsLayerNode * m_pFirstChangedLayer
OdGsViewImpl * refView() const
void removeViewRef(OdGsViewImpl *pView)
bool postprocessModelLoading(OdGsFiler *pFiler)
OdVector< OdGsBaseModelReactor *, OdMemoryAllocator< OdGsBaseModelReactor * > > m_baseModelReactors
OdDbStub * background() const
void highlight(const OdGiPathNode &path, bool bDoIt=true, OdUInt32 nStyle=0, const OdGsView *pView=NULL)
virtual bool saveModelState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL) const
void addViewRef(OdGsViewImpl *pView)
std::map< OdUInt32, OdGsIntParamPtr > SelectionStyleParamMap
OdGiOpenDrawableFn openDrawableFn() const
std::pair< OdGsViewImpl *, OdUInt32 > ViewRef
bool viewClippingOverride() const
virtual void highlightImpl(const OdGiPathNode &path, const OdGsMarker *pMarkers, OdUInt32 nMarkers, bool bDoIt=true, OdUInt32 nStyle=0, const OdGsView *pView=NULL)
RenderType renderType() const
OdGsBaseVectorizeDevice * refDevice() const
virtual void updateViewProps(const OdGsViewImpl &viewport)
void setVisualStyle(OdDbStub *visualStyleId)
virtual OdUInt32 getLocalViewportId(OdGsViewImpl *pView)
void setTransform(const OdGeMatrix3d &xForm)
bool setSectioning(const OdGePoint3dArray &points, const OdGeVector3d &upVector, double dTop, double dBottom)
void setEnableLightsInBlocks(bool bEnable)
void hide(const OdGiPathNode &path, const OdGsMarker *pMarkers, OdUInt32 nMarkers, bool bDoIt=true, bool bSelectHidden=false, const OdGsView *pView=NULL)
void setSectioningVisualStyle(OdDbStub *visualStyleId)
virtual void onErasedImpl(OdGiDrawable *pErased, OdGiDrawable *pParent)
bool isIdentityTransform() const
void setDisableNotifications(bool bOn)
void addModelReactor(OdGsModelReactor *pReactor)
void setBackground(OdDbStub *backgroundId)
virtual bool loadModelState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL)
OdUInt32 viewChanges(OdUInt32 viewportId) const
OdGsBaseModelLocalIdsPtr m_pViewIds
void setDrawableGsNode(OdGiDrawable *pDrawable, OdGsCache *pNode)
const ViewProps & viewProps(OdUInt32 viewportId) const
OdGeMatrix3d transform() const
void detachAllFromDb(const OdDbBaseDatabase *pDb)
OdGsView::RenderMode m_renderModeOverride
OdUInt32 numViewProps() const
void setInvalidVp(unsigned int viewportId, bool val)
void setViewClippingOverride(bool bEnable)
virtual void onAddedImpl(OdGiDrawable *pAdded, OdGiDrawable *pParent, AdditionMode additionMode=kAddDrawable)
void onAdded(OdGiDrawable *pAdded, OdGiDrawable *pParent)
OdGeExtents3d & transformExtents(OdGeExtents3d &pExts) const
virtual bool onPropertyModified(OdGsBaseModelReactor::ModelProperty nProp)
std::pair< const OdGsBaseModule *, OdUInt32 > ModuleRef
bool isViewExtentsCalculationEnabled() const
void setCheckFaded(bool bOn)
void onErased(OdGiDrawable *pErased, OdGiDrawable *pParent)
virtual void onModifiedImpl(OdGiDrawable *pModified, OdGiDrawable *pParent)
OdRxObjectPtr m_pGsReserved
void rescanSelStyleFlag()
void onModifiedNodeImp(OdGsNode *pCache, OdGiDrawable *pDrawable, OdGiDrawable *pParent, bool bGraphicsOnly)
bool hasChangedLayers() const
OdGiDrawablePtr open(OdDbStub *objectId)
OdUInt32 refModulesCount() const
OdUInt32 selectionStyleRef(const OdGsNode *pNode) const
void onAdded(OdGiDrawable *pAdded, OdDbStub *parentID)
void invalidateVisible(OdGsDevice *pDevice)
virtual void propagateLayerChanges(OdGsBaseVectorizeDevice &device)
const OdGsViewImpl * viewById(OdUInt32 viewportId) const
virtual bool loadClientModelState(OdGsFiler *pFiler)
virtual void externalTransformImpl(const OdGiPathNode &path, const OdGsMarker *pMarkers, OdUInt32 nMarkers, bool bDoIt=true, const OdGsMatrixParam *xForm=NULL, const OdGsView *pView=NULL)
void invalidate(OdGsView *pView)
virtual void onModifiedGraphics(const OdGiDrawable *pModified, OdDbStub *parentID) ODRX_OVERRIDE
virtual void attachLocalViewportId(OdGsViewImpl *pView, OdGsViewImpl *pFrom=NULL)
bool setSectioning(const OdGePoint3dArray &points, const OdGeVector3d &upVector)
void setEnableViewExtentsCalculation(bool bEnable)
void onErased(OdGiDrawable *pErased, OdDbStub *parentID)
bool isSelectable() const
OdGsCache * drawableGsNode(const OdGiDrawable *pDrawable)
virtual bool viewSectioningOverride() const =0
virtual RenderType renderType() const =0
virtual OdGsView::RenderMode renderModeOverride() const =0
virtual bool viewClippingOverride() const =0
OdGePoint3dArray m_points