25#ifndef ODTRRNDRENDERSETTINGS
26#define ODTRRNDRENDERSETTINGS
31#include "../TrVisDefs.h"
32#include "../TrVisMetafileStream.h"
75 template <OdUInt32 nElems>
150#define OdTrRndRS_SetFor2dWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw2dFacetEdges, kDrawIsolines, \
151 kDrawOrder, kDrawBackground, kDrawLineweights, kDrawAntiAliasing, \
153#define OdTrRndRS_SetFor3dWireframe { kDraw2dFacets, kDraw2dFacetEdges, kDrawRasterImages, kDrawIsolines, \
154 kDrawBackground, kDrawLineweights, kDrawAntiAliasing, \
156#define OdTrRndRS_SetForHiddenLine { kDraw3dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
157 kDrawBackground, kDrawLineweights, kDrawAntiAliasing, \
160#define OdTrRndRS_SetForFlatShaded { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, \
161 kDrawBackground, kDrawLineweights, kDrawLighting, kDrawShadows, kDrawFog, kDrawAntiAliasing, \
162 kDrawMaterials, kDrawTextures, kFaceNormals, kPerVertexLighting, kSpecularHighlighting, \
164#define OdTrRndRS_SetForGouraudShaded { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, \
165 kDrawBackground, kDrawLineweights, kDrawLighting, kDrawShadows, kDrawFog, kDrawAntiAliasing, \
166 kDrawMaterials, kDrawTextures, kPerVertexLighting, kSpecularHighlighting, \
168#define OdTrRndRS_SetForFlatShadedWithWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
169 kDrawBackground, kDrawLineweights, kDrawLighting, kDrawShadows, kDrawFog, kDrawAntiAliasing, \
170 kDrawMaterials, kDrawTextures, kFaceNormals, kPerVertexLighting, kSpecularHighlighting, \
172#define OdTrRndRS_SetForGouraudShadedWithWireframe { kDraw3dFacets, kDraw2dFacets, kDrawRasterImages, kDraw3dFacetEdges, kDraw2dFacetEdges, \
173 kDrawBackground, kDrawLineweights, kDrawLighting, kDrawShadows, kDrawFog, kDrawAntiAliasing, \
174 kDrawMaterials, kDrawTextures, kPerVertexLighting, kSpecularHighlighting, \
176#define OdTrRndRS_FX { kDrawFX, kNullFlag }
447 OdUInt16 passMask = 0xFFFF,
bool bSearchNested =
true)
const;
473 while (nFlags && *pFlags)
479 while (nFlags && *pFlags)
740 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)
OdUInt8 * serializationFlagsPtr()
void setNextPass(MultiPassType passType, const OdTrRndRenderSettingsPtr &pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
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
const OdTrRndDifferentialTransitionPtr & differentialTransition(MultiPassType passType) const
bool isDefaultLighting() const
static OdUInt32 make_edgesStyle(OdPs::LineEndStyle lesStyle, OdPs::LineJoinStyle ljsStyle)
const OdUInt8 * serializationFlagsPtr() const
OdUInt32 makeGeomMarkerVisibilities() const
OdArray< OdTrRndRenderSettingsReactor *, OdMemoryAllocator< OdTrRndRenderSettingsReactor * > > m_reactors
bool loadNextPass(MultiPassType passType, OdGsFiler *pFiler)
@ kPropEdgesCreaseFilter3d
bool isRenderModeOverride() const
OdTrRndRenderSettings * nextPass(MultiPassType passType)
void resetDrawFlag(OdUInt32 nFlag, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool hasNextPass(MultiPassType passType) const
void resetDrawFlags(const OdUInt32 *pFlags, OdUInt32 nFlags=kNumFlags, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setLastPass(MultiPassType passType, const OdTrRndRenderSettingsPtr &pNextPass, 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
static OdPs::LineJoinStyle get_lineJoinStyle(OdUInt32 lineStyle)
OdTrRndRenderSettingsPtr nextPassPtr(OdTrVisGeomType geomType)
void setRenderMode(OdGsView::RenderMode rMode, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setRenderModeOverride(bool bSet, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettingsPtr m_pNextPass[kNumMultiPassTypes]
OdTrRndRenderSettings * nextPass(OdTrVisGeomType geomType)
OdGsView::RenderMode m_renderMode
MultiPassType geomTypeMultiPass(OdTrVisGeomType geomType) const
bool save(OdGsFiler *pFiler) const
void setLastPass(MultiPassType passType, OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool drawFlag(OdUInt32 nFlag) const
const Color & resolveColor(const Color &clr) const
float m_floatProps[kNumFloatProps]
void forceReactorUpdate(OdTrRndRSUpdateReactor rsReact=kRSCallReactor)
OdTrRndRSUpdateReactor reactorDefault() const
bool isGeomTypeVisible(OdTrVisGeomType geomType) const
OdInt32 m_intProps[kNumIntegerProps]
void removeReactor(OdTrRndRenderSettingsReactor *pReactor)
void setDrawFlag(OdUInt32 nFlag, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettingsPtr & nextPassPtr(MultiPassType passType)
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)
OdTrRndRenderSettingsPtr searchPassId(OdUInt16 passId, OdTrRndRenderSettingsPtr pSelfPtr=OdTrRndRenderSettingsPtr(), OdUInt16 passMask=0xFFFF, bool bSearchNested=true) const
const OdTrRndRenderSettings * nextPass(MultiPassType passType) const
void setForRenderMode(OdGsView::RenderMode rm, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool hasReactor(OdTrRndRenderSettingsReactor *pReactor) const
static OdUInt32 extendedPropsInfo(const UIPropEntry **ppEntries=NULL)
bool hasNextPass(OdTrVisGeomType geomType) const
static OdPs::LineEndStyle get_lineEndStyle(OdUInt32 lineStyle)
OdTrRndRenderSettings(OdGsView::RenderMode initialRenderMode=OdGsView::k2DOptimized, OdTrRndRSUpdateReactor rsDefault=kRSCallReactor)
void setPassId(OdUInt16 nPassId, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void clearDrawFlags(OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettings & operator=(const OdTrRndRenderSettings &rs)
void react(OdTrRndRSUpdateReactor rsReact)
@ kMultiPassForIntersections
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
void setValue(FloatProps nProp, float fVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void resolveByViewportDef(const OdTrVisViewportShadingDef &vpDef)
static OdUInt32 make_creaseFilter(CreaseFilterDefault defFilter)
static CreaseFlags get_creaseFilterFront(OdUInt32 creaseFilter)
@ kOverrideEdgesLinestyle
BitSet< kNumFlagRegs > m_nDrawFlags
@ kPropFacesSpecularPower
OdInt32 value(IntegerProps nProp) const
OdTrRndDifferentialTransitionPtr m_pDifTrans[kNumMultiPassTypes]
const OdTrRndRenderSettingsPtr nextPassPtr(OdTrVisGeomType geomType) const
bool isLightingEnabled_() const
bool isColorModifiersEnabled() const
void setPropsDefault(OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool is3dFacesWithLinesEnabled() const
static OdUInt32 make_creaseFilter(CreaseFlags frontLimit, CreaseFlags backLimit)
const OdTrRndRenderSettingsPtr & nextPassPtr(MultiPassType passType) const
bool load(OdGsFiler *pFiler)
static OdUInt32 creaseFlagEncode(CreaseFlags flags)
float value(FloatProps nProp) const
void resetDifferentialTransition(MultiPassType passType)
const OdTrRndRenderSettings * nextPass(OdTrVisGeomType geomType) const
const Color & color(ColorProps nProp, bool bResolved=true) const
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 OdTrRndRenderSettings & rsViewportSettings(OdUInt32 numViewport)=0
virtual OdUInt32 rsViewportFlags(OdUInt32 numViewport) const =0
virtual bool rsIsViewportRenderModeOverride(OdUInt32 numViewport) const =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)