CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
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;
695 #endif // ODTRRNDRENDERSETTINGS
#define GETBIT(flags, bit)
void setRenderModeOverride(bool bSet, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool isGeomTypeVisible(OdTrVisGeomType geomType) const
const OdUInt8 * serializationFlagsPtr() const
@ kCreaseDrawFrontEdgesWithCorners
OdUInt32 makeGeomMarkerVisibilities() const
void setRenderMode(OdGsView::RenderMode rMode, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setColor(ColorProps nProp, const Color &clr, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
float m_floatProps[kNumFloatProps]
bool hasReactor(OdTrRndRenderSettingsReactor *pReactor) const
void setReactorDefault(OdTrRndRSUpdateReactor rsDefault)
virtual OdTrRndRenderSettings & rsViewportSettings(OdUInt32 numViewport)=0
#define SETBIT_1(flags, bit)
UIDefVal(float floatProp)
void setValue(FloatProps nProp, float fVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettingsPtr & nextPassPtr(MultiPassType passType)
void resetDrawFlag(OdUInt32 nFlag, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
static OdUInt32 make_creaseFilter(CreaseFilterDefault defFilter)
OdInt32 value(IntegerProps nProp) const
virtual OdUInt32 rsViewportFlags(OdUInt32 numViewport) const =0
void removeReactor(OdTrRndRenderSettingsReactor *pReactor)
@ kCreaseDrawFrontEdgesOnly
#define SETBIT(flags, bit, value)
void resolveByViewportDef(const OdTrVisViewportDef &vpDef)
@ kCreaseDrawBackEdgesOnly
void setValue(IntegerProps nProp, OdInt32 nVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool isLightingEnabled_() const
OdTrRndDifferentialTransitionPtr m_pDifTrans[kNumMultiPassTypes]
OdUInt8 * serializationFlagsPtr()
bool save(OdGsFiler *pFiler) const
UIPropRanges(OdUInt32 uintMin, OdUInt32 uintMax)
OdTrRndRenderSettings(const OdTrRndRenderSettings &rs)
void setDifferentialTransition(MultiPassType passType, const OdTrRndDifferentialTransitionPtr &pDifTrans)
const Color & resolveColor(const Color &clr) const
struct OdTrRndRenderSettings::UIDefVal::ColorProp m_colorProp
OdArray< OdTrRndRenderSettingsReactor *, OdMemoryAllocator< OdTrRndRenderSettingsReactor * > > m_reactors
void setDrawFlag(OdUInt32 nFlag, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRSUpdateReactor reactorDefault() const
BitSet< kNumFlagRegs > m_nDrawFlags
@ kCreaseDrawBackEdgesWithCorners
OdStaticDefSharedPtr< OdTrRndRenderSettings > OdTrRndRenderSettingsStaticPtr
virtual bool rsIsViewportRenderModeOverride(OdUInt32 numViewport) const =0
UIPropRanges(float fltMin, float fltMax)
void clearDrawFlags(OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool isFaceColorOverrideEnabled() const
Color(ColorType colorType=kColorBackground, ODCOLORREF colorVal=ODRGBA(0, 0, 0, 255))
static OdUInt32 creaseFlagEncode(CreaseFlags flags)
void react(OdTrRndRSUpdateReactor rsReact)
OdTrRndRenderSettings(OdGsView::RenderMode initialRenderMode=OdGsView::k2DOptimized, OdTrRndRSUpdateReactor rsDefault=kRSCallReactor)
#define SETBIT_0(flags, bit)
bool load(OdGsFiler *pFiler)
void setPropsDefault(OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void forceReactorUpdate(OdTrRndRSUpdateReactor rsReact=kRSCallReactor)
bool isLightingEnabled() const
virtual void rsViewportSettings(OdUInt32 numViewport, OdTrRndRenderSettingsPtr &rs) const =0
void set(OdUInt32 nFlag, bool bSet)
const OdTrRndRenderSettings * nextPass(MultiPassType passType) const
void setForRenderMode(OdGsView::RenderMode rm, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool loadNextPass(MultiPassType passType, OdGsFiler *pFiler)
static OdUInt32 make_creaseFilter(CreaseFlags frontLimit, CreaseFlags backLimit)
UIDefVal(ColorType colorType, ODCOLORREF colorVal=ODRGBA(0, 0, 0, 255))
OdTrRndRenderSettings & operator=(const OdTrRndRenderSettings &rs)
@ kCreaseDrawBreakEdgesWithCorners
void setValueU(IntegerProps nProp, OdUInt32 nVal, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
OdTrRndRenderSettingsStaticPtr kTrRndNullRenderSettings
const OdUInt8 * getPtr() const
const OdTrRndRenderSettingsPtr & nextPassPtr(MultiPassType passType) const
static CreaseFlags creaseFlagDecode(OdUInt32 flags)
virtual OdTrVisViewportId rsViewportId(OdUInt32 numViewport) const =0
const Color & color(ColorProps nProp, bool bResolved=true) const
bool drawFlag(OdUInt32 nFlag) const
@ kCreaseDrawBreakEdgesOnly
void setDrawFlag(OdUInt32 nFlag, bool bSet, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
void setLastPassCopy(MultiPassType passType, const OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
virtual void rsApplyViewportRenderModeOverride(OdUInt32 numViewport)=0
bool get(OdUInt32 nFlag) const
bool isRenderModeOverride() const
Color m_colorProps[kNumColorProps]
OdGsView::RenderMode renderMode() const
OdSharedPtr< OdTrRndRenderSettings > OdTrRndRenderSettingsPtr
void resetDifferentialTransition(MultiPassType passType)
bool hasNextPass(MultiPassType passType) const
virtual void rsSetViewportRenderModeOverride(OdUInt32 numViewport, bool bOverride)=0
void setLastPass(MultiPassType passType, OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
const OdTrRndDifferentialTransitionPtr & differentialTransition(MultiPassType passType) const
UIPropRanges(OdInt32 intMin, OdInt32 intMax)
void setNextPass(MultiPassType passType, OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool isDefaultLighting() const
bool isFaceNormalsEnabled() const
OdTrRndRenderSettings * nextPass(MultiPassType passType)
static OdUInt32 extendedPropsInfo(const UIPropEntry **ppEntries=NULL)
static CreaseFlags get_creaseFilterFront(OdUInt32 creaseFilter)
OdInt32 m_intProps[kNumIntegerProps]
void resetDrawFlags(const OdUInt32 *pFlags, OdUInt32 nFlags=kNumFlags, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
virtual ~OdTrRndRenderSettingsManager()
OdGsView::RenderMode m_renderMode
float value(FloatProps nProp) const
void reset(OdUInt32 nFlag)
virtual OdUInt32 rsNumViewports() const =0
void setDrawFlags(const OdUInt32 *pFlags, OdUInt32 nFlags=kNumFlags, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)
bool is2dModeEnabled() const
@ kPropFacesSpecularPower
OdUInt32 valueU(IntegerProps nProp) const
bool is3dFacesWithLinesEnabled() const
void addReactor(OdTrRndRenderSettingsReactor *pReactor)
UIDefVal(OdUInt32 uintProp)
OdTrRndRenderSettingsPtr m_pNextPass[kNumMultiPassTypes]
static CreaseFlags get_creaseFilterBack(OdUInt32 creaseFilter)
UIDefVal(OdInt32 intProp)
virtual void renderSettingsChanged(OdTrRndRenderSettings *pRSets)=0
@ kPropEdgesCreaseFilter3d
OdTrRndRenderSettingsManager()
void setNextPassCopy(MultiPassType passType, const OdTrRndRenderSettings *pNextPass, OdTrRndRSUpdateReactor rsReact=kRSReactorDefault)