24#ifndef __ODGIFACEEDGEDATATRAITSSAVER_H__
25#define __ODGIFACEEDGEDATATRAITSSAVER_H__
39#define EX_TRAITS_RESTORE_ONEXIT
41#ifdef EX_TRAITS_SELMARK_RESTORE
45#ifdef EX_TRAITS_TRAITSMOD_ONEXIT
46#define EX_TRAITS_TRAITSMOD_ONEXIT_SET() \
49#define EX_TRAITS_TRAITSMOD_ONEXIT_SET()
52#ifdef EX_TRAITS_RESTORE_ONEXIT
53#define EX_TRAITS_SET(prevStorage, curStorage, param) \
54 prevStorage = curStorage = param
55#define EX_TRAITS_DEFINE(type, prevStorage, curStorage) \
56 type prevStorage, curStorage
57#define EX_TRAITS_DEFINE_PTR(type, prevStorage, curStorage) \
58 type prevStorage, *curStorage
60#define EX_TRAITS_SET(prevStorage, curStorage, param) \
62#define EX_TRAITS_DEFINE(type, prevStorage, curStorage) \
64#define EX_TRAITS_DEFINE_PTR(type, prevStorage, curStorage) \
66#ifdef EX_TRAITS_SELMARK_RESTORE
67#undef EX_TRAITS_SELMARK_RESTORE
100#ifdef EX_TRAITS_SELMARK_RESTORE
121 std::map< OdDbStub*, bool >::iterator it =
m_layersByBlock.find( layerId );
136#ifdef EX_TRAITS_SELMARK_RESTORE
155 if (m_curTrueColor != trueColor)
157 m_curTrueColor = trueColor;
165 if (m_curTrueColor != pTrueColors[
index])
174 if (m_curLayerId != pLayers[
index])
202 if (pFaceData && pTraits)
221#ifdef EX_TRAITS_SELMARK_RESTORE
242#ifdef EX_TRAITS_RESTORE_ONEXIT
244 if (m_prevMapper) m_prevMapper =
new OdGiMapper(*m_curMapper);
254 if (pFaceData->
visibility() && !ignoreFaceVisibilities)
259#ifdef EX_TRAITS_RESTORE_ONEXIT
262 bool bModified =
false;
275#ifdef EX_TRAITS_SELMARK_RESTORE
291 if (m_prevMapper)
delete m_prevMapper;
342 if (m_curMaterialId != pMaterials[faceIndex])
357 if (m_curTransparency != pTransparencies[faceIndex])
389 if (pEdgeData && pTraits)
416#ifdef EX_TRAITS_SELMARK_RESTORE
437#ifdef EX_TRAITS_RESTORE_ONEXIT
440 bool bModified =
false;
460#ifdef EX_TRAITS_SELMARK_RESTORE
502 if (m_curLinetypeId != pLinetypes[edgeIndex])
535#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 OdGiDrawablePtr openDrawable(OdDbStub *drawableId)=0
virtual OdGiContext & giContext() const =0
virtual OdUInt32 drawContextFlags() const
@ kForceMarkersOnModified
virtual bool effectivelyVisible() const
virtual const OdGiPathNode * currentGiPath() const =0
virtual void onTraitsModified()=0
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes(OdGiDrawableTraits *pTraits) const ODRX_SEALED
OdDbStub ** linetypeIds() const
const OdUInt16 * colors() const
const OdCmEntityColor * trueColors() const
const OdGsMarker * selectionMarkers() const
OdDbStub ** layerIds() 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 OdUInt16 * colors() const
const OdCmEntityColor * trueColors() const
const OdGiMapper * mappers() const
const OdUInt8 * visibility() const
const OdGsMarker * selectionMarkers() const
const OdCmTransparency * transparency() const
OdDbStub ** materials() const
OdDbStub ** layerIds() const
OdGiFaceDataTraitsSaver(const OdGiFaceData *pFaceData, OdGiSubEntityTraits *pTraits, OdGiConveyorContext *pDrawCtx, OdGsView::RenderMode renderMode, bool bForEdge=false, bool ignoreFaceVisibilities=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)
OdDbStub * m_defaultLayerId
std::map< OdDbStub *, bool > m_layersByBlock
bool setColor(const OdUInt16 *pColors, int index)
EX_TRAITS_DEFINE(OdCmEntityColor, m_prevTrueColor, m_curTrueColor)
bool isDefaultLayer(OdDbStub *layerId)
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 * material() const =0
virtual void setLineType(OdDbStub *lineTypeId)=0
virtual void setMapper(const OdGiMapper *pMapper)=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 const OdGiMapper * mapper() const =0
virtual OdCmEntityColor trueColor() const =0
virtual OdDbStub * layer() const =0
virtual OdDbStub * lineType() const =0
virtual void setMaterial(OdDbStub *materialId)=0
virtual void setTransparency(const OdCmTransparency &transparency)