CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #ifndef __ODGIFACEEDGEDATATRAITSSAVER_H__
25 #define __ODGIFACEEDGEDATATRAITSSAVER_H__
36 #define EX_TRAITS_RESTORE_ONEXIT
38 #ifdef EX_TRAITS_SELMARK_RESTORE
42 #ifdef EX_TRAITS_TRAITSMOD_ONEXIT
43 #define EX_TRAITS_TRAITSMOD_ONEXIT_SET() \
45 #else // EX_TRAITS_TRAITSMOD_ONEXIT
46 #define EX_TRAITS_TRAITSMOD_ONEXIT_SET()
47 #endif // EX_TRAITS_TRAITSMOD_ONEXIT
49 #ifdef EX_TRAITS_RESTORE_ONEXIT
50 #define EX_TRAITS_SET(prevStorage, curStorage, param) \
51 prevStorage = curStorage = param
52 #define EX_TRAITS_DEFINE(type, prevStorage, curStorage) \
53 type prevStorage, curStorage
54 #define EX_TRAITS_DEFINE_PTR(type, prevStorage, curStorage) \
55 type prevStorage, *curStorage
56 #else // EX_TRAITS_RESTORE_ONEXIT
57 #define EX_TRAITS_SET(prevStorage, curStorage, param) \
59 #define EX_TRAITS_DEFINE(type, prevStorage, curStorage) \
61 #define EX_TRAITS_DEFINE_PTR(type, prevStorage, curStorage) \
63 #ifdef EX_TRAITS_SELMARK_RESTORE
64 #undef EX_TRAITS_SELMARK_RESTORE
65 #endif // EX_TRAITS_SELMARK_RESTORE
97 #ifdef EX_TRAITS_SELMARK_RESTORE
115 #ifdef EX_TRAITS_SELMARK_RESTORE
117 #endif // EX_TRAITS_SELMARK_RESTORE
132 if (m_curTrueColor != trueColor)
134 m_curTrueColor = trueColor;
142 if (m_curTrueColor != pTrueColors[
index])
151 if (m_curLayerId != pLayers[
index])
174 if (pFaceData && pTraits)
193 #ifdef EX_TRAITS_SELMARK_RESTORE
199 #endif // EX_TRAITS_SELMARK_RESTORE
214 #ifdef EX_TRAITS_RESTORE_ONEXIT
216 if (m_prevMapper) m_prevMapper =
new OdGiMapper(*m_curMapper);
217 #endif // EX_TRAITS_RESTORE_ONEXIT
231 #ifdef EX_TRAITS_RESTORE_ONEXIT
234 bool bModified =
false;
247 #ifdef EX_TRAITS_SELMARK_RESTORE
254 #endif // EX_TRAITS_SELMARK_RESTORE
263 if (m_prevMapper)
delete m_prevMapper;
289 #endif // EX_TRAITS_RESTORE_ONEXIT
314 if (m_curMaterialId != pMaterials[faceIndex])
329 if (m_curTransparency != pTransparencies[faceIndex])
361 if (pEdgeData && pTraits)
388 #ifdef EX_TRAITS_SELMARK_RESTORE
394 #endif // EX_TRAITS_SELMARK_RESTORE
409 #ifdef EX_TRAITS_RESTORE_ONEXIT
412 bool bModified =
false;
432 #ifdef EX_TRAITS_SELMARK_RESTORE
440 #endif // EX_TRAITS_SELMARK_RESTORE
449 #endif // EX_TRAITS_RESTORE_ONEXIT
474 if (m_curLinetypeId != pLinetypes[edgeIndex])
507 #ifdef EX_TRAITS_RESTORE_ONEXIT
524 #endif // __ODGIFACEEDGEDATATRAITSSAVER_H__
#define GETBIT(flags, bit)
virtual void setTrueColor(const OdCmEntityColor &color)=0
OdDbStub ** materials() const
void setColorIndex(OdInt16 colorIndex)
virtual OdDbStub * lineType() const =0
virtual OdCmTransparency transparency() const
virtual OdUInt32 drawContextFlags() const
const OdGiFaceData * m_pFaceData
#define EX_TRAITS_SET(prevStorage, curStorage, param)
virtual void setSelectionMarker(OdGsMarker selectionMarker)=0
~OdGiEdgeDataTraitsSaver()
const OdGsMarker * selectionMarkers() const
~OdGiFaceEdgeDataTraitsSaver()
#define SETBIT_1(flags, bit)
OdGiSubEntityTraits * m_pTraits
OdDbStub ** layerIds() const
virtual void setColor(OdUInt16 color)=0
bool setLayer(OdDbStub **pLayers, int index)
#define EX_TRAITS_TRAITSMOD_ONEXIT_SET()
virtual void setTransparency(const OdCmTransparency &transparency)
OdGiFaceEdgeDataTraitsSaverBase(OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode)
virtual void setLineType(OdDbStub *lineTypeId)=0
const OdUInt16 * colors() const
virtual OdCmEntityColor trueColor() const =0
@ kForceMarkersOnModified
EX_TRAITS_DEFINE_PTR(OdDbStub *, m_prevLayerId, m_curLayerId)
const OdCmEntityColor * trueColors() const
virtual OdDbStub * layer() const =0
OdGiEdgeDataTraitsSaver(const OdGiEdgeData *pEdgeData, OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode, bool bFaceChk=false)
~OdGiFaceDataTraitsSaver()
OdGiFaceEdgeDataTraitsSaverBase()
virtual const OdGiMapper * mapper() const =0
virtual void onTraitsModified()=0
OdGiConveyorContext * m_pDrawCtx
const OdGsMarker * selectionMarkers() const
virtual OdDbStub * material() const =0
bool onExit(bool bFaceChk=false)
virtual void setLayer(OdDbStub *layerId)=0
EX_TRAITS_DEFINE_PTR(OdDbStub *, m_prevLinetypeId, m_curLinetypeId)
const OdUInt16 * colors() const
virtual bool effectivelyVisible() const
virtual void setMaterial(OdDbStub *materialId)=0
OdDbStub ** linetypeIds() const
const OdUInt8 * visibility() const
EX_TRAITS_DEFINE(OdCmTransparency, m_prevTransparency, m_curTransparency)
const OdUInt8 * visibility() const
virtual const OdGiPathNode * currentGiPath() const =0
OdGiFaceEdgeDataTraitsSaver(const OdGiFaceData *pFaceData, const OdGiEdgeData *pEdgeData, OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode)
EX_TRAITS_DEFINE(OdCmEntityColor, m_prevTrueColor, m_curTrueColor)
bool setEdgeTraits(int edgeIndex)
const OdCmEntityColor * trueColors() const
EX_TRAITS_DEFINE_PTR(const OdGiMapper *, m_prevMapper, m_curMapper)
bool setFaceTraits(int faceIndex)
bool setTrueColor(const OdCmEntityColor *pTrueColors, int index)
OdDbStub ** layerIds() const
virtual void setMapper(const OdGiMapper *pMapper)=0
virtual OdGsMarker selectionMarker() const =0
OdGsView::RenderMode m_renderMode
const OdGiEdgeData * m_pEdgeData
EX_TRAITS_DEFINE_PTR(OdDbStub *, m_prevMaterialId, m_curMaterialId)
bool setColor(const OdUInt16 *pColors, int index)
OdGiFaceDataTraitsSaver(const OdGiFaceData *pFaceData, OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode, bool bForEdge=false)
const OdGiMapper * mappers() const
const OdCmTransparency * transparency() const