25 #ifndef ODTRRNDRENDERSETTINGS
26 #define ODTRRNDRENDERSETTINGS
31 #include "../TrVisDefs.h"
32 #include "../TrVisMetafileStream.h"
75 template <OdUInt32 nElems>
140 #define OdTrRndRS_SetFor2dWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw2dFacetEdges, kDrawIsolines, \
141 kDrawOrder, kDrawBackground, kDrawLineweights, \
143 #define OdTrRndRS_SetFor3dWireframe { kDraw2dFacets, kDraw2dFacetEdges, kDrawRasterImages, kDrawIsolines, \
144 kDrawBackground, kDrawLineweights, \
146 #define OdTrRndRS_SetForHiddenLine { kDraw3dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
147 kDrawBackground, kDrawLineweights, \
150 #define OdTrRndRS_SetForFlatShaded { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, \
151 kDrawBackground, kDrawLineweights, kDrawLighting, \
152 kDrawMaterials, kDrawTextures, kFaceNormals, kPerVertexLighting, kSpecularHighlighting, \
154 #define OdTrRndRS_SetForGouraudShaded { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, \
155 kDrawBackground, kDrawLineweights, kDrawLighting, \
156 kDrawMaterials, kDrawTextures, kPerVertexLighting, kSpecularHighlighting, \
158 #define OdTrRndRS_SetForFlatShadedWithWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
159 kDrawBackground, kDrawLineweights, kDrawLighting, \
160 kDrawMaterials, kDrawTextures, kFaceNormals, kPerVertexLighting, kSpecularHighlighting, \
162 #define OdTrRndRS_SetForGouraudShadedWithWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
163 kDrawBackground, kDrawLineweights, kDrawLighting, \
164 kDrawMaterials, kDrawTextures, kPerVertexLighting, kSpecularHighlighting, \
166 #define OdTrRndRS_FX { kDrawFX, kNullFlag }
430 while (nFlags && *pFlags)
436 while (nFlags && *pFlags)
647 default:
return false;
#define SETBIT(flags, bit, value)
#define SETBIT_0(flags, bit)
#define GETBIT(flags, bit)
#define SETBIT_1(flags, bit)
OdStaticDefSharedPtr< OdTrRndRenderSettings > OdTrRndRenderSettingsStaticPtr
OdSharedPtr< OdTrRndRenderSettings > OdTrRndRenderSettingsPtr
OdTrRndRenderSettingsStaticPtr kTrRndNullRenderSettings
void reset(OdUInt32 nFlag)
void set(OdUInt32 nFlag, bool bSet)
bool get(OdUInt32 nFlag) const
void addReactor(OdTrRndRenderSettingsReactor *pReactor)
void setNextPass(MultiPassType passType, OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettings(const OdTrRndRenderSettings &rs)
bool isFaceColorOverrideEnabled() const
OdUInt32 valueU(IntegerProps nProp) const
OdGsView::RenderMode renderMode() const
bool isDefaultLighting() const
OdTrRndRenderSettings * nextPass(MultiPassType passType)
OdUInt32 makeGeomMarkerVisibilities() const
OdArray< OdTrRndRenderSettingsReactor *, OdMemoryAllocator< OdTrRndRenderSettingsReactor * > > m_reactors
bool loadNextPass(MultiPassType passType, OdGsFiler *pFiler)
@ kPropEdgesCreaseFilter3d
bool isRenderModeOverride() const
void resetDrawFlag(OdUInt32 nFlag, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool hasNextPass(MultiPassType passType) const
void resetDrawFlags(const OdUInt32 *pFlags, OdUInt32 nFlags=kNumFlags, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setValue(IntegerProps nProp, OdInt32 nVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
static CreaseFlags creaseFlagDecode(OdUInt32 flags)
Color m_colorProps[kNumColorProps]
void setReactorDefault(OdTrRndRSUpdateReactor rsDefault)
bool isLightingEnabled() const
void setRenderMode(OdGsView::RenderMode rMode, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setRenderModeOverride(bool bSet, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettingsPtr m_pNextPass[kNumMultiPassTypes]
OdGsView::RenderMode m_renderMode
bool save(OdGsFiler *pFiler) const
void setLastPass(MultiPassType passType, OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
const OdTrRndDifferentialTransitionPtr & differentialTransition(MultiPassType passType) const
bool drawFlag(OdUInt32 nFlag) const
const Color & resolveColor(const Color &clr) const
const OdUInt8 * serializationFlagsPtr() const
float m_floatProps[kNumFloatProps]
void forceReactorUpdate(OdTrRndRSUpdateReactor rsReact=kRSCallReactor)
OdTrRndRSUpdateReactor reactorDefault() const
bool isGeomTypeVisible(OdTrVisGeomType geomType) const
OdInt32 m_intProps[kNumIntegerProps]
OdTrRndRenderSettings & operator=(const OdTrRndRenderSettings &rs)
void removeReactor(OdTrRndRenderSettingsReactor *pReactor)
void setDrawFlag(OdUInt32 nFlag, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setNextPassCopy(MultiPassType passType, const OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setDrawFlags(const OdUInt32 *pFlags, OdUInt32 nFlags=kNumFlags, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setLastPassCopy(MultiPassType passType, const OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void resolveByViewportDef(const OdTrVisViewportDef &vpDef)
void setForRenderMode(OdGsView::RenderMode rm, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdUInt8 * serializationFlagsPtr()
bool hasReactor(OdTrRndRenderSettingsReactor *pReactor) const
static OdUInt32 extendedPropsInfo(const UIPropEntry **ppEntries=NULL)
OdTrRndRenderSettings(OdGsView::RenderMode initialRenderMode=OdGsView::k2DOptimized, OdTrRndRSUpdateReactor rsDefault=kRSCallReactor)
void clearDrawFlags(OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void react(OdTrRndRSUpdateReactor rsReact)
void setDrawFlag(OdUInt32 nFlag, bool bSet, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
static CreaseFlags get_creaseFilterBack(OdUInt32 creaseFilter)
void setValueU(IntegerProps nProp, OdUInt32 nVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setColor(ColorProps nProp, const Color &clr, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
@ kCreaseDrawBreakEdgesWithCorners
@ kCreaseDrawBackEdgesOnly
@ kCreaseDrawBreakEdgesOnly
@ kCreaseDrawFrontEdgesOnly
@ kCreaseDrawFrontEdgesWithCorners
@ kCreaseDrawBackEdgesWithCorners
bool is2dModeEnabled() const
bool isFaceNormalsEnabled() const
const Color & color(ColorProps nProp, bool bResolved=true) const
void setValue(FloatProps nProp, float fVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettingsPtr & nextPassPtr(MultiPassType passType)
const OdTrRndRenderSettingsPtr & nextPassPtr(MultiPassType passType) const
static OdUInt32 make_creaseFilter(CreaseFilterDefault defFilter)
static CreaseFlags get_creaseFilterFront(OdUInt32 creaseFilter)
BitSet< kNumFlagRegs > m_nDrawFlags
@ kPropFacesSpecularPower
OdInt32 value(IntegerProps nProp) const
OdTrRndDifferentialTransitionPtr m_pDifTrans[kNumMultiPassTypes]
const OdTrRndRenderSettings * nextPass(MultiPassType passType) const
bool isLightingEnabled_() const
void setPropsDefault(OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool is3dFacesWithLinesEnabled() const
static OdUInt32 make_creaseFilter(CreaseFlags frontLimit, CreaseFlags backLimit)
bool load(OdGsFiler *pFiler)
static OdUInt32 creaseFlagEncode(CreaseFlags flags)
float value(FloatProps nProp) const
void resetDifferentialTransition(MultiPassType passType)
void setDifferentialTransition(MultiPassType passType, const OdTrRndDifferentialTransitionPtr &pDifTrans)
virtual ~OdTrRndRenderSettingsManager()
virtual OdUInt32 rsNumViewports() const =0
virtual void rsViewportSettings(OdUInt32 numViewport, OdTrRndRenderSettingsPtr &rs) const =0
OdTrRndRenderSettingsManager()
virtual OdUInt32 rsViewportFlags(OdUInt32 numViewport) const =0
virtual bool rsIsViewportRenderModeOverride(OdUInt32 numViewport) const =0
virtual OdTrRndRenderSettings & rsViewportSettings(OdUInt32 numViewport)=0
virtual void rsSetViewportRenderModeOverride(OdUInt32 numViewport, bool bOverride)=0
virtual OdTrVisViewportId rsViewportId(OdUInt32 numViewport) const =0
virtual void rsApplyViewportRenderModeOverride(OdUInt32 numViewport)=0
virtual void renderSettingsChanged(OdTrRndRenderSettings *pRSets)=0
Color(ColorType colorType=kColorBackground, ODCOLORREF colorVal=ODRGBA(0, 0, 0, 255))
UIPropRanges(OdInt32 intMin, OdInt32 intMax)
UIPropRanges(OdUInt32 uintMin, OdUInt32 uintMax)
UIPropRanges(float fltMin, float fltMax)
UIDefVal(OdInt32 intProp)
struct OdTrRndRenderSettings::UIDefVal::ColorProp m_colorProp
UIDefVal(ColorType colorType, ODCOLORREF colorVal=ODRGBA(0, 0, 0, 255))
UIDefVal(float floatProp)
UIDefVal(OdUInt32 uintProp)