CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #ifndef __OD_GS_BASE_MATERIAL_VIEW__
25 #define __OD_GS_BASE_MATERIAL_VIEW__
66 kProcessMaterials = (1 << 1),
68 kProcessMappersAndMaterials = 3,
70 kMappersForRender = (1 << 2),
71 kMaterialsForRender = (1 << 3),
73 kMappersAndMaterialsForRender = 12,
75 kProcessForRender = 15,
78 kEnableDelayCache = (1 << 4)
105 friend class OdDefDelayCacheEntryMap;
106 friend class OdManageMViewPerDrawableData;
108 bool m_bMaterialCommited;
109 struct ExtentsContainer
113 bool m_bExtentsValid;
118 const OdGiMapper *m_pCurMapper, *m_pCopyMapper;
119 const OdDbStub *m_pCurMaterial, *m_pCopyMaterial;
120 DelayCacheEntry m_Cache;
121 DelayCacheEntry *m_pTail;
123 DelayCache() : m_pCurMapper(
NULL), m_pCopyMapper(
NULL)
124 , m_pCurMaterial(
NULL), m_pCopyMaterial(
NULL)
131 struct MViewPerDrawableData
133 bool m_bMapperNeedExtents;
135 ExtentsContainer m_CurrentDrawableExtents;
136 DelayCache m_DelayCache;
137 MViewPerDrawableData()
138 : m_bMapperNeedExtents(
false)
139 , m_bBaseLevel(
false)
141 m_CurrentDrawableExtents.m_bExtentsValid = m_CurrentDrawableExtents.m_bAwaiting =
false;
142 m_CurrentDrawableExtents.m_pCurrentDrawable =
NULL;
144 ~MViewPerDrawableData()
149 m_CurrentDrawableExtents.m_bExtentsValid = m_CurrentDrawableExtents.m_bAwaiting =
false;
150 m_bMapperNeedExtents =
false;
151 m_CurrentDrawableExtents.m_pCurrentDrawable =
NULL;
153 } *m_pCurMvDrawableData, m_mvBaseDrawableData, m_mvGlobalDrawableDataInitializer;
318 void computeDrawableExtents();
352 resetConstructorFlags(uMaterialViewFlags);
368 resetConstructorFlags(uMaterialViewFlags);
373 return (&view() !=
this);
379 #endif // __OD_GS_BASE_MATERIAL_VIEW__
OdGiMaterialItemPtr loadMaterialItem(OdGsFiler *pFiler)
bool isMappingDelayed() const
virtual bool loadMaterialCache(OdGsMaterialNode *pNode, OdGsFiler *pFiler)
static bool saveMaterialTextureManager(const OdGiMaterialTextureManager *pManager, OdGsFiler *pFiler, OdGsMaterialTextureDataFiler *pSaver)
virtual bool doDraw(OdUInt32 drawableFlags, const OdGiDrawable *pDrawable)
bool isMapperEnabled() const
virtual bool saveClientMaterialCache(const OdRxObject *pMtl, OdGsFiler *pFiler)
virtual OdGiMaterialItemPtr fillMaterialCache(OdGiMaterialItemPtr prevCache, OdDbStub *materialId, const OdGiMaterialTraitsData &materialData)
void resetCurrentMapper(OdGiMapperItemPtr pMapper)
virtual void play(OdGsBaseMaterialVectorizer &mView) const
bool isMapperAvailable() const
DelayCacheEntry * m_pNext
virtual bool computeDrawableExtents(const OdGiDrawable *pDrawable, OdGeExtents3d &extents)
OdGiMaterialTraitsData m_nullMaterialTraitsData
~OdGsBaseMaterialVectorizer()
bool isMaterialEnabled() const
void resetCurrentMaterial(OdGiMaterialItemPtr pMaterial)
bool isMaterialAvailable() const
virtual bool skipMaterialProcess(OdDbStub *materialId) const
virtual ~DelayCacheEntry()
void resetCurrentMaterial()
OdSmartPtr< OdGiMaterialTextureData > OdGiMaterialTextureDataPtr
virtual bool computeDelayedExtents(const OdGiDrawable *pDrawable, OdGeExtents3d &extents)
virtual OdGiMaterialTextureDataPtr loadClientMaterialTextureData(OdGsFiler *)
void resetConstructorFlags(OdUInt32 uMaterialViewFlags)
virtual void mapperChangedForDelayCache()
DelayCacheEntry * nextEntry()
virtual void processMaterialNode(OdDbStub *materialId, OdGsMaterialNode *node)
virtual void endViewVectorization()
OdUInt32 m_uMaterialViewFlags
void appendDelayCacheEntry(DelayCacheEntry *pEntry)
virtual bool saveMaterialCache(const OdGsMaterialNode *pNode, OdGsFiler *pFiler)
virtual void beginViewVectorization()
static bool saveMaterialTexture(const OdGiMaterialTexture *pTexture, OdGsFiler *pFiler)
OdGiMapperItemPtr _itlCreateMapperItem() const
static bool loadMaterialTextureManager(OdGiMaterialTextureManager *pManager, OdGsFiler *pFiler, OdGsMaterialTextureDataFiler *pSaver)
OdGiMapperItemPtr currentMapper(bool bForCoords=true) const
virtual void playDelayCacheEntry(const DelayCacheEntry *pEntry)
OdGiMapperItemPtr m_pCurrentMapperItem
virtual bool saveClientMaterialTextureData(const OdGiMaterialTextureData *, OdGsFiler *)
virtual void renderMaterialCache(OdGiMaterialItemPtr pCache, OdDbStub *materialId)
virtual void beginMetafile(OdRxObject *pMetafile)
OdGiMaterialItemPtr _itlCreateMaterialItem() const
OdGsBaseMaterialVectorizer(OdUInt32 uMaterialViewFlags=kProcessMappersAndMaterials)
OdGsBaseMaterialView(OdUInt32 uMaterialViewFlags=kProcessMappersAndMaterials)
virtual bool getDeviceMapperMatrix(OdGeMatrix3d &dm) const
OdGiMaterialItemPtr m_pNullMaterialItem
virtual void delayCacheProcessed(const OdGiDrawable *pDrawable)
#define GS_TOOLKIT_EXPORT
void setNextEntry(DelayCacheEntry *pNext)
virtual void nullMaterialStub()
OdGiMaterialItemPtr m_pCurrentMaterialItem
virtual DelayCacheEntryType internalType() const
virtual void endMetafile(OdRxObject *pMetafile)
virtual OdRxObjectPtr loadClientMaterialCache(OdGsFiler *pFiler, OdGiMaterialItem *pMatItem)
bool saveMaterialItem(const OdGiMaterialItem *pMatItem, OdGsFiler *pFiler)
static OdGiMaterialTexturePtr loadMaterialTexture(OdGsFiler *pFiler)
OdGiMaterialItemPtr currentMaterial() const
virtual void onTraitsModified()
OdGsBaseMaterialViewMT(OdUInt32 uMaterialViewFlags=kProcessMappersAndMaterials)