CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #ifndef __ODGSMODELIMPL_H__
25 #define __ODGSMODELIMPL_H__
27 #define OD_MATERIAL_CACHE_SUPPORTED
52 #define CACHE_STATISTICS
59 class OdGsBaseModelImpl;
120 friend class CFxGsExtension;
142 #if defined(CACHE_STATISTICS)
145 #endif//CACHE_STATISTICS
149 kCheckFaded = (1 << 0),
150 kEnableLinetypes = (1 << 1),
151 kModelSelectable = (1 << 2),
152 kLightsInBlocks = (1 << 3),
153 kSkipViewClip = (1 << 4),
154 kIdentityXform = (1 << 5)
160 #ifdef ODA_DIAGNOSTICS
165 typedef std::pair<OdGsViewImpl*, OdUInt32>
ViewRef;
167 typedef std::pair<const OdGsBaseModule*, OdUInt32>
ModuleRef;
173 #ifdef ODGS_LOCAL_IDS
176 virtual OdUInt32 getMaxLocalViewportId()
const;
184 if(m_viewProps.size()>viewportId)
185 return m_viewProps[viewportId].isInvalid();
189 OdGsBaseModelImpl*
impl() {
return m_impl; }
206 , m_dTop(0.0), m_dBottom(0.0), m_visualStyle(
NULL) { }
219 if(m_viewProps.size()>viewportId)
220 m_viewProps[viewportId].setInvalid(val);
247 #ifdef ODGS_LOCAL_IDS
357 bool isIdentityTransform()
const;
396 double dTop,
double dBottom);
401 bool isViewClippingOverride()
const;
491 #endif // __ODGSMODELIMPL_H__
#define GETBIT(flags, bit)
void setBackground(OdDbStub *backgroundId)
virtual bool loadClientModelState(OdGsFiler *pFiler)
virtual bool onHighlight(OdGsModel *pModel, const OdGiPathNode &path, bool bDoIt, const OdGsView *pView)
const ViewProps & viewProps(OdUInt32 viewportId) const
void invalidateRegenDrawBlocks(OdGsViewImpl &view, const OdDbStub *layoutId)
virtual void highlightImpl(const OdGiPathNode &path, bool bDoIt=true, const OdGsView *pView=NULL)
void setRenderType(RenderType renderType)
void onModified(OdGiDrawable *pModified, OdDbStub *parentID)
virtual bool loadModelState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL)
OdVector< OdGsModelReactor *, OdMemoryAllocator< OdGsModelReactor * > > m_modelReactors
virtual RenderType renderType() const =0
OdArray< ViewRef, OdMemoryAllocator< ViewRef > > m_views
void setEnableLinetypes(bool bEnable)
virtual OdGsLayerNode * gsLayerNode(OdDbStub *layerId, const OdGsBaseVectorizer *pView)
OdArray< ModuleRef, OdMemoryAllocator< ModuleRef > > m_modules
OdGsBaseVectorizeDevice * refDevice() const
#define SETBIT(flags, bit, value)
virtual void onModifiedImpl(OdGiDrawable *pModified, OdGiDrawable *pParent)
OdDbStub * m_modelVisualStyle
virtual void onAddedImpl(OdGiDrawable *pAdded, OdGiDrawable *pParent, AdditionMode additionMode=kAddDrawable)
OdArray< ViewProps > m_viewProps
void onAdded(OdGiDrawable *pAdded, OdDbStub *parentID)
void setInvalidVp(unsigned int viewportId, bool val)
void setViewClippingOverride(bool bEnable)
bool isViewClippingOverride() const
void setSelectable(bool bEnable)
OdGiOpenDrawableFn openDrawableFn() const
OdGiDrawablePtr(* OdGiOpenDrawableFn)(OdDbStub *id)
void setRenderModeOverride(OdGsView::RenderMode mode=OdGsView::kNone)
void detachAllFromDb(const OdDbBaseDatabase *pDb)
void onModifiedNode(OdGsNode *pCache, OdGiDrawable *pDrawable, OdGiDrawable *pParent)
void onModifiedDrawable(OdGiDrawable *pDrawable, OdGiDrawable *pParent)
void onErased(OdGiDrawable *pErased, OdGiDrawable *pParent)
OdGsMaterialCachePtr m_pMaterialCache
virtual OdGsNode * newNode(ENodeType ntp, const OdGiDrawable *drawable, bool bSetGsNode)
RenderType renderType() const
virtual void updateViewProps(const OdGsViewImpl &viewport)
virtual bool onPropertyModified(OdGsBaseModelReactor::ModelProperty nProp)
OdGiDrawablePtr m_pTransVisualStyle
bool isSelectable() const
void removeViewRef(OdGsViewImpl *pView)
bool isLinetypesEnabled() const
OdGsBaseModelImpl * impl()
OdGsBaseModelImpl * m_impl
virtual bool makeStock(OdDbStub *layoutId)
void setCheckFaded(bool bOn)
OdUInt32 viewChanges(OdUInt32 viewportId) const
void invalidateSectionableBlocks()
GS_TOOLKIT_EXPORT OdGiDrawablePtr fxOpenDrawable(OdGsBaseModel *, OdDbStub *)
void setEnableLightsInBlocks(bool bEnable)
bool hasChangedLayers() const
OdDbStub * visualStyle() const
OdGsLayerNode * m_pFirstChangedLayer
OdGsMaterialCache * materialCache()
void invalidateVisible(OdGsDevice *pDevice)
void onPropertyModifiedImpl(OdGsBaseModelReactor::ModelProperty nProp, bool &bReturnValue)
std::pair< const OdGsBaseModule *, OdUInt32 > ModuleRef
bool postprocessModelLoading(OdGsFiler *pFiler)
OdGeMatrix3d transform() const
OdGsViewImpl * refView() const
virtual void clearChangedLayersList()
virtual void detach(OdGsNode *pNode)
void setAdditionMode(AdditionMode mode)
bool invalidVp(unsigned int viewportId) const
void addModelReactor(OdGsModelReactor *pReactor)
const ViewPropsArray & getViewProps() const
OdVector< OdGsBaseModelReactor *, OdMemoryAllocator< OdGsBaseModelReactor * > > m_baseModelReactors
void setVisualStyle(const OdGiVisualStyle &visualStyle)
OdRxObjectPtr m_pGsReserved
OdGsView::RenderMode renderModeOverride() const
void invalidate(OdGsViewImpl &view, OdUInt32 mask)
void invalidate(InvalidationHint hint)
OdDbStub * background() const
virtual bool onPropertyModified(OdGsModel *pModel, ModelProperty nProp)
virtual bool isViewPropsValid(OdUInt32 viewportId) const
virtual bool onInvalidate(OdGsModel *pModel, OdGsView *pView)
const OdGiDrawable * visualStyleDrawable() const
bool setSectioning(const OdGePoint3dArray &points, const OdGeVector3d &upVector, double dTop, double dBottom)
virtual OdGsNode * gsNode(OdGiDrawable *pDrawable)
void setEnableSectioning(bool bEnable)
void highlight(const OdGiPathNode &path, bool bDoIt=true, const OdGsView *pView=NULL)
void removeModelReactor(OdGsModelReactor *pReactor)
virtual void invalidateEntRect(OdGsEntityNode *pNode, OdGsContainerNode *pParent, bool bForceIfNoExtents)
bool visualStyle(OdGiVisualStyle &visualStyle) const
OdDbStub * m_modelBackground
void addNode(OdGsNode *pNode)
AdditionMode additionMode() const
void addViewRef(OdGsViewImpl *pView)
#define GS_TOOLKIT_EXPORT
OdUInt32 refModulesCount() const
void setTransform(const OdGeMatrix3d &xForm)
const SectioningSettings & getSectioning() const
void onErased(OdGiDrawable *pErased, OdDbStub *parentID)
void setOpenDrawableFn(OdGiOpenDrawableFn openDrawableFn)
void onUnerased(OdGiDrawable *pUnerased, OdDbStub *parentID)
void onUnerased(OdGiDrawable *pUnerased, OdGiDrawable *pParent)
OdGiOpenDrawableFn m_openDrawableFn
virtual bool saveModelState(OdGsFiler *pFiler, OdGsBaseVectorizer *pVectorizer=NULL) const
friend GS_TOOLKIT_EXPORT OdGiDrawablePtr fxOpenDrawable(OdGsBaseModel *, OdDbStub *)
virtual void onErasedImpl(OdGiDrawable *pErased, OdGiDrawable *pParent)
virtual bool onInvalidate(OdGsModel *pModel, OdGsModel::InvalidationHint hint)
SectioningSettings m_sectioning
void invalidate(OdGsView *pView)
void onModified(OdGiDrawable *pModified, OdGiDrawable *pParent)
void setSectioningVisualStyle(OdDbStub *visualStyleId)
virtual void propagateLayerChanges(OdGsBaseVectorizeDevice &device)
bool setSectioning(const OdGePoint3dArray &points, const OdGeVector3d &upVector)
void onAdded(OdGiDrawable *pAdded, OdGiDrawable *pParent)
virtual bool saveClientModelState(OdGsFiler *pFiler) const
void setVisualStyle(OdDbStub *visualStyleId)
std::pair< OdGsViewImpl *, OdUInt32 > ViewRef
OdGiDrawablePtr open(OdDbStub *objectId)
bool isLightsInBlocksEnabled() const
bool isSectioningEnabled() const
virtual void releaseStock(OdDbStub *layoutId)
virtual void invalidateEntRect(OdGiDrawable *pDrawable, OdGiDrawable *pParent, bool bForceIfNoExtents=false)
bool isIdentityTransform() const
StreamP open(const OdString &path, int acc=Read, Creation dispos=OpenExisting, Share sh=DenyNo)
OdUInt32 numViewProps() const
OdGsView::RenderMode m_renderModeOverride
OdGePoint3dArray m_points