12 #ifndef __GR_CommonDispOption_h__
13 #define __GR_CommonDispOption_h__
31 class GR_SchemeColors;
35 #define FLAG_ACCESSORS(FLAGS, METHOD, FLAG) \
36 bool METHOD() const { return FLAGS.FLAG; } \
37 void METHOD(bool onoff) { FLAGS.FLAG = onoff; }
39 #define FLAG_ACCESSORS_BUMP_OPTS(FLAGS, METHOD, FLAG) \
40 bool METHOD() const { return FLAGS.FLAG; } \
41 void METHOD(bool onoff) { if(FLAGS.FLAG != onoff) mySerialNum++; \
52 bool save(std::ostream &,
int indent=0)
const;
60 void setColorScheme(
const char *scheme_name);
62 static void reloadAllColorSchemes();
71 {
return myColors[
c][myGammaPassPtr?*myGammaPassPtr:0]; }
80 bool gamma =
false)
const
81 {
return myColors[color_name][gamma?1:0]; }
88 #define GET_COL(func, val) \
89 const UT_Color &func() const \
90 { return myColors[val][myGammaPassPtr?*myGammaPassPtr:0]; }
217 {
return myCurrentWireColor[myGammaPassPtr?*myGammaPassPtr:0]; }
219 {
return myColors[myCrtAuxColor][myGammaPassPtr?*myGammaPassPtr:0]; }
226 void componentLocateColor(
int component_type,
234 {
return myAlphas[alpha_name]; }
236 #define GET_ALPHA(func, val) fpreal func() const { return myAlphas[val]; }
272 {
return myMarkerSize; }
274 { myMarkerSize =
SYSmax(size, 0.1); }
284 FLAG_ACCESSORS(mySaveFlags, drawTransparentMaps, drawTransparentMaps)
285 FLAG_ACCESSORS(mySaveFlags, highQualityLighting, highQualityLighting)
296 polygonConvexQuality)
314 FLAG_ACCESSORS(mySaveFlags, dynamicReduceBitDepth, reduceBitDepth )
317 overrideColorAttrib);
324 FLAG_ACCESSORS(myNoSaveFlags, showComponentSelections, showComponentSelections)
329 FLAG_ACCESSORS(myNoSaveFlags, showTempSelections, showTempSelections)
335 FLAG_ACCESSORS(myNoSaveFlags, shadingOpenCurves, shadingOpenCurves)
349 bool cuspNormals()
const
350 {
return mySaveFlags.cuspNormals; }
353 if(c != mySaveFlags.cuspNormals)
356 mySaveFlags.cuspNormals =
c;
360 {
return myNormalCuspAngle; }
367 myNormalCuspAngle =
a;
371 {
return myVertNormalLimit; }
374 poly_limit =
SYSmax(0, poly_limit);
375 if(poly_limit != myVertNormalLimit)
378 myVertNormalLimit = poly_limit;
390 if(myTangentMethod != method)
393 myTangentMethod = method;
400 myUpdates.texSize =
true; }
404 myUpdates.tex3DSize =
true; }
408 { myTextureMemLimitMB =
SYSmax(32, max_size);
409 myUpdates.textureMem =
true; }
414 int textureAnisotropy()
const;
415 void textureAnisotropy(
int ta);
420 int getHDRTextureFormat()
const;
421 void setHDRTextureFormat(
int hdrformat);
422 void setDynamicFormat(
int format);
427 int getHDRTexture3DFormat()
const;
428 void setHDRTexture3DFormat(
int hdrformat);
429 void setDynamic3DFormat(
int format);
433 void setTextureScale(
float sc);
434 float getTextureScale()
const;
435 float getUserTextureScale()
const;
436 void setDynamicScale(
float sc);
437 float getDynamicScale()
const;
439 void setTexture3DScale(
float sc);
440 float getTexture3DScale()
const;
441 float getUserTexture3DScale()
const;
442 void setDynamic3DScale(
float sc);
443 float getDynamic3DScale()
const;
450 void setParticleTextureSize(
int max_w,
int max_h);
451 void getParticleTextureSize(
int &max_w,
int &max_h)
const;
457 void setMaxTextureSize(
bool limit,
int max_w=0,
int max_h=0);
461 void setMaxTexture3DSize(
bool limit,
int max_w=0,
int max_h=0,
int max_d=0);
466 bool mipMapTextures()
const;
467 void mipMapTextures(
bool onoff);
468 void setDynamicMipMap(
bool onoff);
471 void resetDynamicParms();
489 { myGSplatsAlphaCulling =
SYSclamp(c, 0.0, 1.0); }
493 { myDisplacementQuality =
SYSmax(q, 0.0); }
511 stride =
SYSmax(1, stride);
512 if (stride != myHeightFieldWireStride)
515 myHeightFieldWireStride =
stride;
528 void autoDPIScale(
bool dpi);
533 {
return mySaveFlags.enableReflectionMaps; }
535 { mySaveFlags.enableReflectionMaps = e; }
537 {
return mySaveFlags.hdrReflectionMaps; }
539 { myUpdates.hdrReflect =
true;
540 mySaveFlags.hdrReflectionMaps = e; }
543 { myUpdates.reflectSize =
true;
544 myReflectMapSize =
SYSclamp(wh, 16, 16384); }
547 { myReflectMinLevel =
SYSclamp(lvl, 0.0, 1.0); }
568 if(lvl != myAgentBaseLOD)
581 if(mode != myAgentWireMode)
584 myAgentWireMode =
mode;
595 void optimizePackedGeometry(
bool opt){ mySaveFlags.optPackedGeo = opt; }
599 { mySaveFlags.offsetVertexDecor = use_offset; }
601 {
return mySaveFlags.offsetVertexDecor; }
622 float LOD()
const {
return myLOD; }
626 myWireWidth*myDPIScale); }
629 : wireWidth() * 2.0; }
634 float pointSize()
const {
return myPointSize*myDPIScale; }
649 { s = myColorDomain[0];
650 e = myColorDomain[1]; }
670 {
return myAmbOcclusionIntensity; }
672 {
return myAmbOcclusionSpread; }
679 {
return myInstancingLimitAction; }
688 { myVisibleObjects.harden(mask); }
690 { myPrimMask =
mask; }
692 void setNormalScale(
float s);
693 void setVectorScale(
float s);
712 void discSize(
float size);
714 { myShadowOffsetVariable = (f>=0.0f) ? f : 0.0f;}
716 { myShadowOffsetConstant = (f>=0.0f) ? f : 0.0f;}
721 myUpdates.shadowSize =
true; }
723 void setColorAttrib(
const char *
a);
724 void setColorType(
int t);
728 myUpdates.sceneAA =
true; }
732 void setViewGamma(
float gamma);
737 { myOCIOColorspace.harden(cs); }
739 { myOCIOLooks.harden(looks); }
741 { myOCIODisplay = display; myOCIOView = view; }
748 { myAmbOcclusionLevel =
SYSclamp(lvl, 1, 4); }
750 { myAmbOcclusionIntensity =
SYSmax(0.0, i); }
752 { myAmbOcclusionScale =
SYSmax(0.001, sc); }
754 { myAmbOcclusionSpread =
SYSclamp(sc, 0.0, 1.0); }
756 { myUseRayTrace = enable; }
758 { myUseDenoise = enable; }
763 myInstancingFraction =
s; }
765 { limit =
SYSmax(0, limit);
768 myInstancingLimit = limit;
771 { myInstancingLimitAction =
SYSclamp(action, 0,2); }
774 { myMinHomeZoom =
SYSmax(val, 0.001); }
780 if(limit != mySubdPolyLimit)
782 mySubdPolyLimit = limit;
787 if(myUVAttrib != attrib)
797 {
return mySaveFlags.onionSkinEnable; }
799 {
return myOnionSkinOptions.myFrameIncrement; }
801 {
return myOnionSkinOptions.myPreFrameCount; }
803 {
return myOnionSkinOptions.myPostFrameCount; }
805 {
return myOnionSkinOptions.myPreFrameColor; }
807 {
return myOnionSkinOptions.myPostFrameColor; }
811 {
return myOnionSkinOptions; }
814 { mySaveFlags.onionSkinEnable = enable; }
816 void setOnionSkinParms(
int frame_inc,
830 myUnusedOnionSkinGroup).exchangeAdd(1);
835 { myUnusedOnionSkinGroup.store(start); }
853 mySerialView2 = num_2d;
883 static bool isYUp() {
return theYUp; }
891 { myAllowPartialRender = allowed; }
893 {
return myAllowPartialRender; }
895 { myPartialPercentDone = p; }
898 return myIsPartialRender ? myPartialPercentDone
904 { myLightList = list;}
908 { myExtraMaterials = materials; }
912 void loadDefaultColors();
913 void getColorsByName();
928 float myHLOffsetVariable;
929 float myHLOffsetConstant;
937 int myParticleTextureWidth;
938 int myParticleTextureHeight;
939 float myShadowOffsetVariable;
940 float myShadowOffsetConstant;
942 bool myUseLightShadowSize;
944 bool myGSplatsNoSelfShadow=
false;
945 int myReflectMapSize;
947 int mySelectionListInst;
948 int mySceneAntialias;
949 int myTextureAnisotropy;
950 int myAmbOcclusionLevel;
951 float myAmbOcclusionIntensity;
952 float myAmbOcclusionScale;
953 float myAmbOcclusionSpread;
954 bool myUseRayTrace =
false;
955 bool myUseDenoise = false ;
968 int myViewComponents;
969 int myTransparentQuality;
970 fpreal myTransparencyCutoff=0.5;
971 fpreal myGSplatsAlphaCulling=0.01;
972 fpreal myDisplacementQuality;
974 fpreal myVolumeAmbientShadows;
975 int myVolumeBSplines;
977 int myHeightFieldWireStride;
979 int myClosureSelection;
982 int myVertNormalLimit;
983 gr_TangentMethod myTangentMethod;
986 float myTextureScale;
987 float myDynamicScale;
988 int myMaxTextureWidth;
989 int myMaxTextureHeight;
990 int myHDRTextureFormat;
994 float myTexture3DScale;
995 float myDynamic3DScale;
996 int myMaxTexture3DWidth;
997 int myMaxTexture3DHeight;
998 int myMaxTexture3DDepth;
999 int myHDRTexture3DFormat;
1000 int myDynamic3DFormat;
1002 int myTextureMemLimitMB;
1004 fpreal myInstancingFraction;
1005 int myInstancingLimit;
1006 int myInstancingLimitAction;
1023 int myAgentMinPoints;
1026 int myAgentBoneDeform;
1027 int myAgentWireMode;
1028 int myAgentMaxBlendShapeLOD;
1033 gr_BBoxMode myBBoxMode;
1034 int mySubdPolyLimit;
1045 unsigned drawTexture :1,
1047 drawDisplacement :1,
1048 drawTexturedSpots :1,
1049 highQualityLighting:1,
1050 ambientOcclusion :1,
1051 limitTextureSize :1,
1052 limitTexture3DSize :1,
1056 drawTransparentMaps:1,
1070 showObjectSelection:1,
1074 overrideColorAttrib:1,
1076 dynamicTexControl :1,
1086 polygonConvexQuality:1,
1088 volumeWireAsPoints :1,
1092 agentBlendShapes :1,
1096 enableReflectionMaps:1,
1097 hdrReflectionMaps :1,
1099 interactiveEnable :1,
1101 outlineSelection :1,
1102 offsetVertexDecor :1,
1104 interpolateLayers :1;
1106 grSaveFlags mySaveFlags;
1108 struct grNoSaveFlags
1110 unsigned snapToSelected :1,
1111 showComponentSelections :1,
1112 showTempSelections :1,
1119 shadingOpenCurves :1,
1120 drawMultiTexture :1,
1121 dynamicMipSetting :1,
1124 applyVisualizers :1;
1130 struct gr_UpdatedOptions
1145 grNoSaveFlags myNoSaveFlags;
1155 int *myGammaPassPtr;
1160 bool myAllowPartialRender;
1161 bool myIsPartialRender;
1162 fpreal myPartialPercentDone;
1164 int myParentViewportID = -1;
1170 float lod = (l>0.0) ? l : 0.001;
1181 if(myColorAttrib != a)
1191 if(myColorType != t)
1204 myColorDomain[0] =
s;
1205 myColorDomain[1] = e;
1211 #undef FLAG_ACCESSORS
void setPointSize(float size)
void allowPartialRender(bool allowed)
fpreal getAgentLODBias() const
void shadowOffsetVariable(float f)
int textureMemLimitMB() const
void setVisContext(int ctxt)
void setLightList(const GR_LightList *list)
void shadowOffsetConstant(float f)
bool SYSisEqual(const UT_Vector2T< T > &a, const UT_Vector2T< T > &b, S tol)
Componentwise equality.
int getOnionSkinPostFrameCount() const
bool defaultGuideFont() const
fpreal getVolumeAmbientShadows() const
void offsetVertexDecor(bool use_offset)
void setMinHomeZoom(fpreal val)
fpreal reflectionMinLevel() const
fpreal getPartialPercentDone() const
void setHDRRendering(bool hdr)
const char * getViewLUT() const
GR_API int getMaxTexture3DSize(RE_RenderContext rc)
fpreal getMarkerSize() const
int getSubdivisionPolyLimit() const
#define GET_ALPHA(func, val)
void interiorWireAlpha(float a)
float getPointSize() const
void setUseViewLUT(bool b)
const UT_StringHolder & getUVDisplayAttrib() const
void setGSplatsNoSelfShadow(bool b)
bool interpolateLayers() const
void setAgentMinPoints(int minp)
void setAgentMaxBlendShapeLODLevel(int lvl)
bool isOnionSkinEnabled() const
int getAgentWireMode() const
const GU_CommonOnionSkinOptions & getOnionSkinParms() const
void closureSelection(int s)
fpreal getAlpha(GR_DisplayColorAlpha alpha_name) const
bool getUseRayTrace() const
int getDynamicFormat() const
int getHeightFieldWireStride() const
const UT_Color & getCurrentWireColor() const
int getVolumeBSplines() const
void limitTexture3DSize(bool ls)
int getInstancingLimit() const
bool allowDeferredTextureLoad() const
bool defaultDPIScale() const
float shadowOffsetVariable() const
float interiorWireAlpha() const
float getViewGamma() const
void setMarkerSize(fpreal size)
void reflectionMinLevel(fpreal lvl)
bool defaultHDRTexture() const
bool offsetVertexDecor() const
void obsoleteOption(bool onoff)
void setViewSerialNum(int num, int num_2d, int id)
bool hdrReflectionMaps() const
GLboolean GLboolean GLboolean GLboolean a
static void setYUp(bool up)
int getTransparentQuality() const
bool autoDPIScale() const
bool getGSplatsNoSelfShadow() const
bool obsoleteOption() const
float hlOffsetConstant() const
bool allowsPartialRender() const
void getColorDomain(fpreal &s, fpreal &e) const
void setUseRayTrace(bool enable)
const GR_LightList * getLightList() const
int getViewComponents() const
fpreal getDisplacementQuality() const
const char * getOCIOLooks() const
bool useReflectionMaps() const
GLdouble GLdouble GLdouble q
bool defaultSmoothLines() const
float hlOffsetVariable() const
fpreal getInstancingFraction() const
void useSelectedAuxColor()
void wireBlend(float blend)
GR_MaterialAtlas * extraMaterials() const
Temporary container for either a RV_Render and an RE_Render.
void setAgentBoneDeform(int d)
int getView3DSerialNum() const
void setInstancingLimitAction(int action)
int getVertexNormalLimit() const
void shadedBoundingBoxes(gr_BBoxMode m)
const UT_Color & getOnionSkinPostFrameColor() const
void interpolateLayers(bool do_interp)
void clearPartialRender()
void reflectionMapSize(int wh)
bool defaultShadowSize() const
vint4 blend(const vint4 &a, const vint4 &b, const vbool4 &mask)
GR_AlphaPass alphaPass() const
void textureMemLimitMB(int max_size)
float shadowOffsetConstant() const
void hlOffsetVariable(float f)
void setColorAttrib(const char *a)
fpreal vectorScale() const
void setGammaPassPtr(int *p)
int getVolumeQuality() const
void setSubdivisionPolyLimit(int limit)
fpreal markerSize() const
int getAmbOcclusionLevel() const
#define FLAG_ACCESSORS_BUMP_OPTS(FLAGS, METHOD, FLAG)
float getAmbOcclusionIntensity() const
int getAgentMinPoints() const
GR_HandleParts & handleParts()
float getAmbOcclusionSpread() const
void setDecorFontSize(GR_DecorFontSize s)
void setOCIOSerial(exint serial)
int getOnionSkinPreFrameCount() const
float getViewBlack() const
#define FLAG_ACCESSORS(FLAGS, METHOD, FLAG)
void setGSplatsAlphaCulling(fpreal c)
void setWireWidth(float width)
const GR_HandleParts & handleParts() const
void setViewWhite(float w)
void volumeWireAsPoints(bool vw)
void setVolumeQuality(int q)
int getViewSerialNum() const
gr_TangentMethod generateTangents() const
void setParentViewportID(int id)
const char * getOCIOColorspace() const
UT_Vector3T< T > SYSclamp(const UT_Vector3T< T > &v, const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
GLint GLint GLsizei GLint GLenum format
bool defaultSceneAA() const
GLint GLenum GLboolean GLsizei stride
const UT_Color & getColor(GR_DisplayColor color_name, bool gamma=false) const
fpreal getNormalCuspAngle() const
void useRegularAuxColor()
int getAgentBaseLODLevel() const
void harden()
Take shallow copy and make it deep.
float getViewWhite() const
void setExtraMaterials(GR_MaterialAtlas *materials)
bool limitTextureSize() const
bool volumeWireAsPoints() const
void alphaPass(GR_AlphaPass pass)
void hlOffsetConstant(float f)
bool defaultTextureSize() const
GLfloat GLfloat GLfloat alpha
void setSceneAntialias(int a)
void setViewBlack(float b)
int getAgentBoneDeform() const
void setNormalCuspAngle(fpreal a)
bool defaultHDRReflect() const
GLuint const GLchar * name
void setViewComponents(int c)
unsigned pickMask() const
fpreal getTransparencyCutoff() const
bool optimizePackedGeometry() const
void setTransparencyCutoff(fpreal c)
float getWireWidth() const
bool isPartialRender() const
void setVolumeBSplines(int bs)
GLboolean GLboolean GLboolean b
void setUVDisplayAttrib(const UT_StringHolder &attrib)
void setOnionSkinEnable(bool enable)
int getLightSampling() const
void setAmbOcclusionLevel(int lvl)
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate active
const UT_Color & crtAuxColor() const
GA_PrimCompat::TypeMask primMask() const
const char * getOCIODisplay() const
GR_API int getMaxTextureSize(RE_RenderContext rc)
void setDisplacementQuality(fpreal q)
int getDynamic3DFormat() const
float getAmbOcclusionScale() const
void generateTangents(gr_TangentMethod method)
void setInstancingLimit(int limit)
void setInstancingFraction(fpreal s)
int getAgentNumLODLevels() const
int selectionListInst() const
bool getDynamicMipMap() const
void setOCIOLooks(const char *looks)
Contains transitional objects to provide some backward compatibility for code that references old GEO...
void setAmbOcclusionIntensity(float i)
const UT_String & visibleObjects() const
bool default3DTextureSize() const
void allowDeferredTextureLoad(bool a)
void hdrReflectionMaps(bool e)
void setUseLightShadowSize(bool e)
bool getHDRRendering() const
const char * colorAttrib() const
int getOnionSkinFrameIncrement() const
float selectionWireWidth() const
#define GET_COL(func, val)
void setOCIOColorspace(const char *cs)
void setHeightFieldWireStride(int stride)
void selectionListInst(int inst)
void setVertexNormalLimit(int poly_limit)
void setActiveRender(bool active)
void useReflectionMaps(bool e)
void setAmbOcclusionScale(float sc)
bool getActiveRender() const
float normalScale() const
LeafData & operator=(const LeafData &)=delete
int getInstancingLimitAction() const
void setAgentWireMode(int mode)
int getShadowMapSize() const
int closureSelection() const
const UT_Color & locateColor(fpreal &alpha) const
int getSceneAntialias() const
void primMask(GA_PrimCompat::TypeMask mask)
bool useLightShadowSize() const
void setUseDenoise(bool enable)
void pickMask(unsigned mask)
float getNormalScale() const
fpreal getMinHomeZoom() const
void limitTextureSize(bool ls)
int getAgentMaxBlendShapeLODLevel() const
void setTransparentQuality(int q)
const UT_Color & getOnionSkinPreFrameColor() const
void setAmbOcclusionSpread(float sc)
void setColorDomain(fpreal s, fpreal e)
fpreal getGSplatsAlphaCulling() const
void setLightSampling(int s)
void setAgentBaseLODLevel(int lvl)
gr_BBoxMode shadedBoundingBoxes() const
int parentViewportID() const
int getUniqueOnionSkinGroup() const
void setOCIODisplayView(const char *display, const char *view)
GLubyte GLubyte GLubyte GLubyte w
bool getUseDenoise() const
void setViewLUT(const char *lut)
fpreal getOnionSkinAlpha() const
int reflectionMapSize() const
void setPartialPercentDone(fpreal p)
bool defaultReflectSize() const
const UT_String & getColorScheme() const
int getView2DSerialNum() const
const UT_Color & color(GR_DisplayColor c) const
void visibleObjects(const char *mask)
void resetUniqueOnionSkinGroup(int start)
bool limitTexture3DSize() const
int getVisContext() const
GR_DecorFontSize getDecorFontSize() const
exint getOCIOSerial() const
bool defaultTextureMem() const
const char * getOCIOView() const
void setShadowMapSize(int s)
int getViewSerialID() const
fpreal getVectorScale() const
void setVolumeAmbientShadows(fpreal q)
void setAgentNumLODLevels(int lvls)