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() \
46 #define EX_TRAITS_TRAITSMOD_ONEXIT_SET()
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
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
97 #ifdef EX_TRAITS_SELMARK_RESTORE
115 #ifdef 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
214 #ifdef EX_TRAITS_RESTORE_ONEXIT
216 if (m_prevMapper) m_prevMapper =
new OdGiMapper(*m_curMapper);
231 #ifdef EX_TRAITS_RESTORE_ONEXIT
234 bool bModified =
false;
247 #ifdef EX_TRAITS_SELMARK_RESTORE
263 if (m_prevMapper)
delete m_prevMapper;
314 if (m_curMaterialId != pMaterials[faceIndex])
329 if (m_curTransparency != pTransparencies[faceIndex])
361 if (pEdgeData && pTraits)
388 #ifdef EX_TRAITS_SELMARK_RESTORE
409 #ifdef EX_TRAITS_RESTORE_ONEXIT
412 bool bModified =
false;
432 #ifdef EX_TRAITS_SELMARK_RESTORE
474 if (m_curLinetypeId != pLinetypes[edgeIndex])
507 #ifdef EX_TRAITS_RESTORE_ONEXIT
#define EX_TRAITS_TRAITSMOD_ONEXIT_SET()
#define EX_TRAITS_SET(prevStorage, curStorage, param)
#define GETBIT(flags, bit)
#define SETBIT_1(flags, bit)
void setColorIndex(OdInt16 colorIndex)
virtual OdUInt32 drawContextFlags() const
@ kForceMarkersOnModified
virtual bool effectivelyVisible() const
virtual void onTraitsModified()=0
virtual const OdGiPathNode * currentGiPath() const =0
OdDbStub ** layerIds() const
OdDbStub ** linetypeIds() const
const OdGsMarker * selectionMarkers() const
const OdCmEntityColor * trueColors() const
const OdUInt16 * colors() const
const OdUInt8 * visibility() const
bool onExit(bool bFaceChk=false)
const OdGiEdgeData * m_pEdgeData
bool setEdgeTraits(int edgeIndex)
~OdGiEdgeDataTraitsSaver()
OdGiEdgeDataTraitsSaver(const OdGiEdgeData *pEdgeData, OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode, bool bFaceChk=false)
EX_TRAITS_DEFINE_PTR(OdDbStub *, m_prevLinetypeId, m_curLinetypeId)
const OdUInt8 * visibility() const
const OdCmEntityColor * trueColors() const
OdDbStub ** materials() const
const OdUInt16 * colors() const
const OdGiMapper * mappers() const
const OdGsMarker * selectionMarkers() const
const OdCmTransparency * transparency() const
OdDbStub ** layerIds() const
OdGiFaceDataTraitsSaver(const OdGiFaceData *pFaceData, OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode, bool bForEdge=false)
EX_TRAITS_DEFINE_PTR(OdDbStub *, m_prevMaterialId, m_curMaterialId)
EX_TRAITS_DEFINE(OdCmTransparency, m_prevTransparency, m_curTransparency)
bool setFaceTraits(int faceIndex)
const OdGiFaceData * m_pFaceData
EX_TRAITS_DEFINE_PTR(const OdGiMapper *, m_prevMapper, m_curMapper)
~OdGiFaceDataTraitsSaver()
OdGiSubEntityTraits * m_pTraits
EX_TRAITS_DEFINE_PTR(OdDbStub *, m_prevLayerId, m_curLayerId)
OdGiConveyorContext * m_pDrawCtx
OdGiFaceEdgeDataTraitsSaverBase()
OdGsView::RenderMode m_renderMode
bool setLayer(OdDbStub **pLayers, int index)
bool setColor(const OdUInt16 *pColors, int index)
EX_TRAITS_DEFINE(OdCmEntityColor, m_prevTrueColor, m_curTrueColor)
OdGiFaceEdgeDataTraitsSaverBase(OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode)
bool setTrueColor(const OdCmEntityColor *pTrueColors, int index)
~OdGiFaceEdgeDataTraitsSaver()
OdGiFaceEdgeDataTraitsSaver(const OdGiFaceData *pFaceData, const OdGiEdgeData *pEdgeData, OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode)
virtual OdGsMarker selectionMarker() const =0
virtual void setLayer(OdDbStub *layerId)=0
virtual OdDbStub * layer() const =0
virtual void setLineType(OdDbStub *lineTypeId)=0
virtual OdDbStub * material() const =0
virtual void setMapper(const OdGiMapper *pMapper)=0
virtual OdDbStub * lineType() const =0
virtual void setSelectionMarker(OdGsMarker selectionMarker)=0
virtual void setColor(OdUInt16 color)=0
virtual OdCmTransparency transparency() const
virtual void setTrueColor(const OdCmEntityColor &color)=0
virtual OdCmEntityColor trueColor() const =0
virtual void setMaterial(OdDbStub *materialId)=0
virtual const OdGiMapper * mapper() const =0
virtual void setTransparency(const OdCmTransparency &transparency)