/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _ODTV_RENDERSETTINGS_H_INCLUDED_ #define _ODTV_RENDERSETTINGS_H_INCLUDED_ #include "OdaCommon.h" #include "Tv.h" #include "TvIObject.h" #include "TvTraitsDef.h" class OdTvRtRenderSettingsId; /** \details The abstract interface class for managing render settings in Visualize SDK. */ class ODTV_EXPORT OdTvRtRenderSettings : public OdTvHandledIObject { public: /** \details Accelerator types. */ enum AcceleratorType { kBVH2, // Classic BVH tree kBVH4, // Two-dimensional BVH tree kBVH8 // Three-dimensional BVH tree }; /** \details Split methods. */ enum SplitMethod { kHalf, // Half split kSAH // SAH split }; /** \details Quality levels. */ enum QualityLevel { kBoundingBox, // Bounding boxes quality kGeometry, // Non-shaded geometry quality kShaded // Shaded geometry quality }; /** \details Default shaders. */ enum DefaultShader { kShadePhong // Default shader }; /** \details Texture quality types. */ enum TextureQuality { kNearest, // Disable bilinear filtration on material texture level. kSmooth, // Enable bilinear filtration for textures, which supports it. kTrilinear, // Generate isotropic mip-maps for material textures and enable ray differentials. kAnisotropic // Generate anisotropic mip-maps for material textures and enable ray differentials. }; /** \details Renderer types. */ enum RendererType { kSoftwareRenderer , // Software renderer kHardwareRenderer, // Prefer hardware renderer kHardwarePartial // Partial hardware renderer }; /** \details Partial render components. */ enum PartialRenderComponents { kReflectionPart = 1 << 0, // Reflection enabled. kRefractionPart = 1 << 1, // Refraction enabled. kDiffuseLightingPart = 1 << 2, // Diffuse lighting component enabled. kSpecularLightingPart = 1 << 3, // Specular lighting component enabled. kAllRenderComponents = kReflectionPart | kRefractionPart | kDiffuseLightingPart | kSpecularLightingPart // All components enabled. }; /** \details Shadow override types. */ enum ShadowTypeOverride { kNoShadowOverride, // Use database settings. kShadowMapsOverride, // Use shadow maps for all light sources. kRayTraceShadowsOverride // Use ray-traced shadows for all light sources. }; /** \details Represents the available sequences for rendered image tiles that can be followed. */ enum TilesOrder { kSpiral = 1, kLeftToRight, kRightToLeft, kTopToBottom, kBottomToTop }; /** \details Sets the name for the render settings. \param sName [in] A new render settings name. \returns A value of type that contains the result of the operation. \remarks If the new name is successfully set, the method returns tvOk; otherwise it returns an appropriate error code. */ virtual OdTvResult setName(const OdString& sName) = 0; /** \details Retrieves the name of the render settings. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns The render settings name. \remarks If the rc parameter is not null and the name is successfully returned, the rc parameter accepts tvOk value; otherwise it contains an appropriate error code. */ virtual OdString getName(OdTvResult* rc = nullptr) const = 0; /** \details Retrieves the current default flag value. If the default flag value is equal to true, the render settings is used as a default one; if the render settings is not used as a default, the method returns false. \param rc [out] A pointer to a value of type that contains the result of the retrieve operation. \returns Returns true if the render settings is the default; otherwise the method returns false. The default render settings can not be deleted or renamed; the description of the default render settings also can not be changed. If the rc parameter is not null and the current value of the default flag was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual bool isDefault(OdTvResult* rc = nullptr) const = 0; /** \details Specifies whether per-object materials should be used. \param bEnable [in] Flag that specifies whether per-object materials should be used. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. If set to false, the global material is used for all objects. */ virtual OdTvResult setMaterialEnabled(bool bEnable) = 0; /** \details Checks whether per-object materials are used. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if per-object materials are used. \remarks If the rc parameter is not null and the name is successfully returned, the rc parameter accepts tvOk value; otherwise it contains an appropriate error code. */ virtual bool getMaterialEnabled(OdTvResult* rc = nullptr) const = 0; /** \details Specifies whether texture sampling (filtering) should be used for image textures. \param bEnable [in] Flag that specifies whether sampling should be used. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setTextureSampling(bool bEnable) = 0; /** \details Checks whether texture sampling (filtering) is used for image textures. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if texture sampling is used, false otherwise. \remarks If the rc parameter is not null and the name is successfully returned, the rc parameter accepts tvOk value; otherwise it contains an appropriate error code. Texture sampling is not applied to textured created in a procedural way. */ virtual bool getTextureSampling(OdTvResult* rc = nullptr) const = 0; /** \details Specifies whether back faces should be rendered. \param bEnable [in] Flag that specifies whether back faces should be rendered. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setBackFacesEnabled(bool bEnable) = 0; /** \details Checks whether back faces rendering is enabled. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if back faces rendering is enabled, false otherwise. \remarks If the rc parameter is not null and the name is successfully returned, the rc parameter accepts tvOk value; otherwise it contains an appropriate error code. */ virtual bool getBackFacesEnabled(OdTvResult* rc = nullptr) const = 0; /** \details Specifies whether shadows should be rendered. \param bEnable [in] Flag that specifies whether shadows should be rendered. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setShadowsEnabled(bool bEnable) = 0; /** \details Checks whether shadows rendering is enabled. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if shadows rendering is enabled, false otherwise. \remarks If the rc parameter is not null and the name is successfully returned, the rc parameter accepts tvOk value; otherwise it contains an appropriate error code. */ virtual bool getShadowsEnabled(OdTvResult* rc = nullptr) const = 0; /** \details Specifies whether checkerboard (diagnostic) background should be used for rendering. \param bEnable [in] Flag that specifies whether checkerboard background should be used. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setDiagnosticBackgroundEnabled(bool bEnable) = 0; /** \details Checks whether checkerboard (diagnostic) background is enabled. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if diagnostic background rendering is enabled, false otherwise. \remarks If the rc parameter is not null and the name is successfully returned, the rc parameter accepts tvOk value; otherwise it contains an appropriate error code. */ virtual bool getDiagnosticBackgroundEnabled(OdTvResult* rc = nullptr) const = 0; /** \details Specifies desirable renderer type. \param renderType [in] Renderer type. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setRendererType(RendererType renderType) = 0; /** \details Retrieves the desirable renderer type. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Renderer type enum value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual RendererType getRendererType(OdTvResult* rc = nullptr) const = 0; /** \details Specifies desirable rendering quality. \param renderQual [in] Rendering quality. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setRenderQuality(QualityLevel renderQual) = 0; /** \details Retrieves the desirable rendering quality. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Rendering quality enum value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual QualityLevel getRenderQuality(OdTvResult* rc = nullptr) const = 0; /** \details Specifies default rendering shader. \param shader [in] Default rendering shader. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setDefaultShader(DefaultShader shader) = 0; /** \details Retrieves the default rendering shader. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Default rendering shader enum value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual DefaultShader getDefaultShader(OdTvResult* rc = nullptr) const = 0; /** \details Specifies textures rendering quality. \param texQlty [in] Textures rendering quality. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setTextureQuality(TextureQuality texQlty) = 0; /** \details Retrieves the textures rendering quality. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Textures rendering quality enum value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual TextureQuality getTextureQuality(OdTvResult* rc = nullptr) const = 0; /** \details Specifies number of samples per pixel. \param nX [in] Number of horizontal samples per pixel. \param nY [in] Number of vertical samples per pixel. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setPixelSamples(OdInt32 nX, OdInt32 nY) = 0; /** \details Retrieves the number of samples per pixel. \param nX [out] Number of horizontal samples per pixel. \param nY [out] Number of vertical samples per pixel. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult getPixelSamples(OdInt32& nX, OdInt32& nY) const = 0; /** \details Specifies number of ray bounces (including reflections, refractions and etc.). \param nBounces [in] Number of ray bounces. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMaxBounces(OdUInt32 nBounces) = 0; /** \details Retrieves the number of ray bounces (including reflections, refractions and etc.). \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Number of ray bounces. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual OdUInt32 getMaxBounces(OdTvResult* rc = nullptr) const = 0; /** \details Specifies maximal number of ray self reflections (when ray reflected inside solid object). \param nRels [in] Maximal number of ray self reflections. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMaxSelfReflections(OdUInt32 nRels) = 0; /** \details Retrieves the maximal number of ray self reflections (when ray reflected inside solid object). \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Maximal number of ray self reflections. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual OdUInt32 getMaxSelfReflections(OdTvResult* rc = nullptr) const = 0; /** \details Specifies maximal number of ray self refractions (when ray refracted inside solid object). \param nRefs [in] Maximal number of ray self refractions. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMaxSelfRefractions(OdUInt32 nRefs) = 0; /** \details Retrieves the maximal number of ray self refractions (when ray refracted inside solid object). \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Maximal number of ray self refractions. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual OdUInt32 getMaxSelfRefractions(OdTvResult* rc = nullptr) const = 0; /** \details Specifies settings for geometry intersecting acceleration tree. \param treeType [in] Type of geometry intersecting acceleration tree. \param splitMode [in] Acceleration tree splitting method. \param nMaxLeafPrims [in] Maximal number of geometry primitives in tree leaf. \param nNodeDepth [in] Maximal depth of tree nodes. \param bSort [in] Pre-sort geometries before adding it into BVH structures. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGeometryAccelerator(AcceleratorType treeType, SplitMethod splitMode = kSAH, OdUInt32 nMaxLeafPrims = 8, OdUInt32 nNodeDepth = 24, bool bSort = true) = 0; /** \details Retrieves the settings of geometry intersecting acceleration tree. \param treeType [out] Type of geometry intersecting acceleration tree. \param splitMode [out] Acceleration tree splitting method. \param nMaxLeafPrims [out] Maximal number of geometry primitives in tree leaf. \param nNodeDepth [out] Maximal depth of tree nodes. \param bSort [out] Pre-sort geometries before adding it into BVH structures. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult getGeometryAccelerator(AcceleratorType& treeType, SplitMethod& splitMode, OdUInt32& nMaxLeafPrims, OdUInt32& nNodeDepth, bool& bSort) const = 0; /** \details Specifies settings for primitives intersecting acceleration tree. \param treeType [in] Type of primitives intersecting acceleration tree. \param splitMode [in] Acceleration tree splitting method. \param nMaxLeafPrims [in] Maximal number of primitives in tree leaf. \param nNodeDepth [in] Maximal depth of tree nodes. \param bSort [in] Pre-sort primitives before adding it into BVH structures. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setPrimitiveAccelerator(AcceleratorType treeType, SplitMethod splitMode = kSAH, OdUInt32 nMaxLeafPrims = 2, OdUInt32 nNodeDepth = 24, bool bSort = true) = 0; /** \details Retrieves the settings of primitives intersecting acceleration tree. \param treeType [out] Type of primitives intersecting acceleration tree. \param splitMode [out] Acceleration tree splitting method. \param nMaxLeafPrims [out] Maximal number of primitives in tree leaf. \param nNodeDepth [out] Maximal depth of tree nodes. \param bSort [out] Pre-sort primitives before adding it into BVH structures. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult getPrimitiveAccelerator(AcceleratorType& treeType, SplitMethod& splitMode, OdUInt32& nMaxLeafPrims, OdUInt32& nNodeDepth, bool& bSort) const = 0; /** \details Specifies ray tracer tolerance override. \param bOverride [in] Enable tolerance overriding. \param fTol [in] Tolerance for single precision floating point operations. \param dTol [in] Tolerance for double precision floating point operations. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setToleranceOverride(bool bOverride, float fTol = 1.0e-8f, double dTol = 1.0e-10) = 0; /** \details Retrieves the ray tracer tolerance override. \param fTol [out] Tolerance for single precision floating point operations. \param dTol [out] Tolerance for double precision floating point operations. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if ray tracer tolerance override enabled or false elsewhere. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual bool getToleranceOverride(float& fTol, double& dTol, OdTvResult* rc = nullptr) const = 0; /** \details Specifies minimal processable ray energy. \param fEnergy [in] Minimal processable ray energy. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMinEnergy(float fEnergy) = 0; /** \details Retrieves the minimal processable ray energy. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Minimal processable ray energy value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual float getMinEnergy(OdTvResult* rc = nullptr) const = 0; // CPU ray-tracer options /** \details Enables line and point primitives processing (real rendering device emulation). \param bEnable [in] Enable line and point primitives processing. \param fWidth [in] Line and point primitives width. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setLinePrimitivesEnabled(bool bEnable, float fWidth = 1.0f) = 0; /** \details Retrieves the line and point primitives processing mode. \param fWidth [out] Line and point primitives width. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if line and point primitives processing mode enabled or false elsewhere. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual bool getLinePrimitivesEnabled(float& fWidth, OdTvResult* rc = nullptr) const = 0; /** \details Specifies maximal number of CPU threads invoking rendering process. \param nThreads [in] Maximal number of CPU threads. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMaxCPUThreads(OdUInt32 nThreads) = 0; /** \details Retrieves the maximal number of CPU threads invoking rendering process. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Maximal number of CPU threads. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual OdUInt32 getMaxCPUThreads(OdTvResult* rc = nullptr) const = 0; /** \details Specifies size of single per-thread computation unit. \param nWidth [in] Width of single computation tile. \param nHeight [in] Height of single computation tile. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setTileSize(OdUInt32 nWidth, OdUInt32 nHeight) = 0; /** \details Retrieves the size of single per-thread computation unit. \param nWidth [out] Width of single computation tile. \param nHeight [out] Height of single computation tile. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult getTileSize(OdUInt32& nWidth, OdUInt32& nHeight) const = 0; /** \details Specifies tiles processing order. \param order [in] Tiles order. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setTileOrder(TilesOrder order) = 0; /** \details Retrieves the tiles processing order. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Tiles processing order. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual TilesOrder getTileOrder(OdTvResult* rc = nullptr) const = 0; /** \details Specifies maximum number of GPU buffer subdivisions (in 1-4 range). \param nSubdivs [in] Number of GPU buffer subdivisions. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMaxGPUBufferSubdivisions(OdUInt32 nSubdivs) = 0; /** \details Retrieves the maximum number of GPU buffer subdivisions (in 1-4 range). \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Maximum number of GPU buffer subdivisions. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual OdUInt32 getMaxGPUBufferSubdivisions(OdTvResult* rc = nullptr) const = 0; /** \details Specifies minimal GPU buffer subdivision size. \param nWidth [in] Minimal width of GPU buffer subdivision. \param nHeight [in] Minimal height of GPU buffer subdivision. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMinGPUBufferSubdivisionSize(OdUInt32 nWidth, OdUInt32 nHeight) = 0; /** \details Retrieves the minimal GPU buffer subdivision size. \param nWidth [out] Minimal width of GPU buffer subdivision. \param nHeight [out] Minimal height of GPU buffer subdivision. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult getMinGPUBufferSubdivisionSize(OdUInt32& nWidth, OdUInt32& nHeight) const = 0; /** \details Specifies GPU buffer size scale coefficient in percents. \param nPercs [in] GPU buffer size scale coefficient in percents. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGPUBufferScalePercents(OdUInt32 nPercs) = 0; /** \details Retrieves the GPU buffer size scale coefficient in percents. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns GPU buffer size scale coefficient in percents. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual OdUInt32 getGPUBufferScalePercents(OdTvResult* rc = nullptr) const = 0; /** \details Specifies local GPU work group size. \param nThreads [in] Local GPU work group size. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGPUWorkGroupSize(OdUInt32 nThreads) = 0; /** \details Retrieves the local GPU work group size. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Local GPU work group size. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual OdUInt32 getGPUWorkGroupSize(OdTvResult* rc = nullptr) const = 0; /** \details Improve memory access coherency using tiled rendering. \param bEnable [in] Enable tiled rendering. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGPUTiledRendering(bool bEnable) = 0; /** \details Checks does GPU tiled rendering enabled. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if tiled rendering enabled or false elsewhere. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual bool getGPUTiledRendering(OdTvResult* rc = nullptr) const = 0; /** \details Force shadow maps inside reflections in GPU renderer. \param bEnable [in] Enable shadow maps forcing inside reflections.. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGPUForceShadowMapsInsideReflections(bool bEnable) = 0; /** \details Checks does shadow maps usage forced inside reflections in GPU renderer. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns True if shadow maps usage forced inside reflections or false elsewhere. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual bool getGPUForceShadowMapsInsideReflections(OdTvResult* rc = nullptr) const = 0; // Partial GPU ray-tracer options /** \details Specifies set of partial render components to process via ray-tracing. \param nComponents [in] Set of bit flags, specified by PartialRenderComponents enumeration. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setPartialRenderComponents(OdUInt32 nComponents) = 0; /** \details Retrieves set of partial render components to process via ray-tracing. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Set of bit flags, specified by PartialRenderComponents enumeration. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual OdUInt32 getPartialRenderComponents(OdTvResult* rc = nullptr) const = 0; /** \details Specifies minimal reflection cutoff value to initiate ray-tracing. \param refCutoff [in] Minimal reflection cutoff value. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMinimalReflectionCutoff(float refCutoff) = 0; /** \details Retrieves minimal reflection cutoff value to initiate ray-tracing. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Minimal reflection cutoff value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual float getMinimalReflectionCutoff(OdTvResult* rc = nullptr) const = 0; /** \details Specifies minimal refraction cutoff value to initiate ray-tracing. \param refCutoff [in] Minimal refraction cutoff value. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMinimalRefractionCutoff(float refCutoff) = 0; /** \details Retrieves minimal refraction cutoff value to initiate ray-tracing. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Minimal refraction cutoff value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual float getMinimalRefractionCutoff(OdTvResult* rc = nullptr) const = 0; /** \details Specifies minimal lighting intensity cutoff value to initiate ray-tracing. \param lightCutoff [in] Minimal lighting intensity cutoff value. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setMinimalLightingCutoff(float lightCutoff) = 0; /** \details Retrieves minimal lighting intensity cutoff value to initiate ray-tracing. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Minimal lighting intensity cutoff value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual float getMinimalLightingCutoff(OdTvResult* rc = nullptr) const = 0; /** \details Sets shadow type override for scene light sources. \param shadowType [in] Shadow type override value. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setShadowTypeOverride(ShadowTypeOverride shadowType) = 0; /** \details Retrieves shadow type override setting. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Shadow type override value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual ShadowTypeOverride getShadowTypeOverride(OdTvResult* rc = nullptr) const = 0; /** \details Enables global illumination. \param bSet [in] Global illumination enable flag. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGlobalIlluminationEnabled(bool bSet) = 0; /** \details Retrieves the global illumination enable flag. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Global illumination enable flag. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual bool getGlobalIlluminationEnabled(OdTvResult* rc = nullptr) const = 0; /** \details Specifies number of global illumination samples. \param nX [in] Horizontal number of samples. \param nY [in] Vertical number of samples. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGlobalIlluminationSamples(OdInt32 nX, OdInt32 nY) = 0; /** \details Retrieves the number of global illumination samples. \param nX [out] Horizontal number of samples. \param nY [out] Vertical number of samples. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult getGlobalIlluminationSamples(OdInt32& nX, OdInt32& nY) const = 0; /** \details Specifies global illumination sampling radius. \param fRad [in] Radius. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGlobalIlluminationRadius(float fRad) = 0; /** \details Retrieves the global illumination sampling radius. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Global illumination radius value. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual float getGlobalIlluminationRadius(OdTvResult* rc = nullptr) const = 0; /** \details Enables global illumination radius auto-calculation. \param bSet [in] Global illumination radius auto-calculation. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGlobalIlluminationAutoRadiusEnabled(bool bSet) = 0; /** \details Retrieves the global illumination radius auto-calculation enable flag. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Global illumination radius auto-calculation mode. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual bool getGlobalIlluminationAutoRadiusEnabled(OdTvResult* rc = nullptr) const = 0; /** \details Specifies global illumination radius auto-calculation coefficient (percents in 0-1 range). \param fPerc [in] Radius auto-calculation coefficient in percents. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGlobalIlluminationAutoRadiusPercents(float fPerc) = 0; /** \details Retrieves the global illumination radius auto-calculation coefficient (percents in 0-1 range). \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Radius auto-calculation coefficient in percents. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual float getGlobalIlluminationAutoRadiusPercents(OdTvResult* rc = nullptr) const = 0; /** \details Specifies global illumination mix coefficient between GI and AO (percents in 0-1 range). \param fCoef [in] Global illumination mixing coefficient. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setGlobalIlluminationOcclusionCoefficient(float fCoef) = 0; /** \details Retrieves the global illumination mix coefficient between GI and AO (percents in 0-1 range). \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Global illumination mixing coefficient. \remarks If the rc parameter is not null and the result was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ virtual float getGlobalIlluminationOcclusionCoefficient(OdTvResult* rc = nullptr) const = 0; /** \details Specifies number of roughness effect samples. \param nX [in] Horizontal number of samples. \param nY [in] Vertical number of samples. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult setRoughnessSamples(OdInt32 nX, OdInt32 nY) = 0; /** \details Retrieves the number of roughness effect samples. \param nX [out] Horizontal number of samples. \param nY [out] Vertical number of samples. \returns A value of the type that contains the result of the operation. \remarks If the operation is successful, the method returns the tvOk value; otherwise it returns an appropriate error code. */ virtual OdTvResult getRoughnessSamples(OdInt32& nX, OdInt32& nY) const = 0; /** \details Copies all render settings data to a specified render settings. All current data in the target render settings will be deleted or overwritten. \param targetRenderSettingsId [in] A target . The data will be copied to the render settings the identifier refers. \returns Returns a value of type that contains the result of the operation. \remarks If the operation was successfully performed, the method returns tvOk; otherwise it returns an appropriate error code. */ virtual OdTvResult copyTo(OdTvRtRenderSettingsId& targetRenderSettingsId) const = 0; }; /** \details A data type that represents a smart pointer to an object. */ typedef OdTvSmartPtr OdTvRtRenderSettingsPtr; /** \details The interface class for a render settings object identifier that allows access to the object. */ class ODTV_EXPORT OdTvRtRenderSettingsId : public OdTvId { public: /** \details Opens the render settings determined by its identifier for a read or write operation. \param mode [in] An open mode value. \param rc [out] A pointer to a value of type that contains the result of the open operation. \returns Returns a smart pointer to the render settings object. \remarks If the rc parameter is not null and the render settings was successfully opened, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. */ OdTvRtRenderSettingsPtr openObject(OdTv::OpenMode mode = OdTv::kForRead, OdTvResult* rc = NULL) const; }; /** \details The base interface class for the iterator of Visualize SDK render settings objects. An iterator object provides sequential access to a collection of render settings. */ class ODTV_EXPORT OdTvRtRenderSettingsIterator : public OdTvIterator, public OdTvIObject { public: /** \details Retrieves the render settings that is currently referenced by the iterator object. \param rc [out] A pointer to a value of type that contains the result of the operation. \returns Returns the render settings identifier if the iterator refers to a render settings; otherwise it returns an identifier with a null value. \remarks If the rc parameter is not null and the render settings identifier was successfully returned, the rc parameter accepts the tvOk value; otherwise it contains an appropriate error code. If the iterator refers to a render settings, the identifier that the method returns is not null (i.e., the result of the isNull() method of the identifier is equal to false). */ virtual OdTvRtRenderSettingsId getRenderSettings(OdTvResult* rc = nullptr) const = 0; /** \details Searches for the render settings defined by its identifier and moves the iterator to this render settings if found. \param renderSettingsId [in] A render settings identifier. \returns Returns a value of type that contains the result of the operation. \remarks If the render settings specified by its identifier was found, the method returns the tvOk; otherwise it returns an appropriate error code. */ virtual OdTvResult seek(const OdTvRtRenderSettingsId& renderSettingsId) = 0; }; /** \details A data type that represents a smart pointer to an object. */ typedef OdTvSmartPtr OdTvRtRenderSettingsIteratorPtr; #endif //_ODTV_RENDERSETTINGS_H_INCLUDED_