Simplygon C++ API  8.3.35800.0
SimplygonSDK::IReductionSettings Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::IReductionSettings:
SimplygonSDK::ISettingsObject SimplygonSDK::IObject

Public Member Functions

virtual bool GetAllowDegenerateTexCoords ()=0
 
virtual const char * GetClass ()
 
virtual bool GetCreateGeomorphGeometry ()=0
 
virtual real GetCurvatureImportance ()=0
 
virtual unsigned int GetDataCreationPreferences ()=0
 
virtual real GetEdgeSetImportance ()=0
 
virtual bool GetGenerateGeomorphData ()=0
 
virtual real GetGeometryImportance ()=0
 
virtual real GetGroupImportance ()=0
 
virtual real GetInwardMoveMultiplier ()=0
 
virtual bool GetKeepSymmetry ()=0
 
virtual bool GetLockGeometricBorder ()=0
 
virtual real GetMaterialImportance ()=0
 
virtual real GetMaxDeviation ()=0
 
virtual real GetMaxEdgeLength ()=0
 
virtual bool GetMergeGeometries ()=0
 
virtual unsigned int GetOnScreenSize ()=0
 
virtual real GetOutwardMoveMultiplier ()=0
 
virtual rid GetProcessSelectionSetID ()=0
 
virtual rstring GetProcessSelectionSetName ()=0
 
virtual unsigned int GetReductionHeuristics ()=0
 
virtual unsigned int GetReductionTargets ()=0
 
virtual real GetShadingImportance ()=0
 
virtual real GetSkinningImportance ()=0
 
virtual unsigned int GetStopCondition ()=0
 
virtual unsigned int GetSymmetryAxis ()=0
 
virtual real GetSymmetryDetectionTolerance ()=0
 
virtual real GetSymmetryOffset ()=0
 
virtual real GetTextureImportance ()=0
 
virtual unsigned int GetTriangleCount ()=0
 
virtual real GetTriangleRatio ()=0
 
virtual bool GetUseAutomaticSymmetryDetection ()=0
 
virtual bool GetUseHighQualityNormalCalculation ()=0
 
virtual bool GetUseSymmetryQuadRetriangulator ()=0
 
virtual bool GetUseVertexWeights ()=0
 
virtual real GetVertexColorImportance ()=0
 
virtual rid GetWeightsFromColorChannelID ()=0
 
virtual rstring GetWeightsFromColorChannelName ()=0
 
virtual bool IsA (const char *type) const
 
virtual void SetAllowDegenerateTexCoords (bool value)=0
 
virtual void SetCreateGeomorphGeometry (bool value)=0
 
virtual void SetCurvatureImportance (real value)=0
 
virtual void SetDataCreationPreferences (unsigned int value)=0
 
virtual void SetEdgeSetImportance (real value)=0
 
virtual void SetGenerateGeomorphData (bool value)=0
 
virtual void SetGeometryImportance (real value)=0
 
virtual void SetGroupImportance (real value)=0
 
virtual void SetInwardMoveMultiplier (real value)=0
 
virtual void SetKeepSymmetry (bool value)=0
 
virtual void SetLockGeometricBorder (bool value)=0
 
virtual void SetMaterialImportance (real value)=0
 
virtual void SetMaxDeviation (real value)=0
 
virtual void SetMaxEdgeLength (real value)=0
 
virtual void SetMergeGeometries (bool value)=0
 
virtual void SetOnScreenSize (unsigned int value)=0
 
virtual void SetOutwardMoveMultiplier (real value)=0
 
virtual void SetProcessSelectionSetID (rid value)=0
 
virtual void SetProcessSelectionSetName (const char *value)=0
 
virtual void SetReductionHeuristics (unsigned int value)=0
 
virtual void SetReductionTargets (unsigned int value)=0
 
virtual void SetShadingImportance (real value)=0
 
virtual void SetSkinningImportance (real value)=0
 
virtual void SetStopCondition (unsigned int value)=0
 
virtual void SetSymmetryAxis (unsigned int value)=0
 
virtual void SetSymmetryDetectionTolerance (real value)=0
 
virtual void SetSymmetryOffset (real value)=0
 
virtual void SetTextureImportance (real value)=0
 
virtual void SetTriangleCount (unsigned int value)=0
 
virtual void SetTriangleRatio (real value)=0
 
virtual void SetUseAutomaticSymmetryDetection (bool value)=0
 
virtual void SetUseHighQualityNormalCalculation (bool value)=0
 
virtual void SetUseSymmetryQuadRetriangulator (bool value)=0
 
virtual void SetUseVertexWeights (bool value)=0
 
virtual void SetVertexColorImportance (real value)=0
 
virtual void SetWeightsFromColorChannelID (rid value)=0
 
virtual void SetWeightsFromColorChannelName (const char *value)=0
 
- Public Member Functions inherited from SimplygonSDK::ISettingsObject
virtual rstring GetErrorString ()=0
 
virtual bool ValidateSettings ()=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static IReductionSettingsSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::ISettingsObject
static bool IsClassA (const char *type)
 
static ISettingsObjectSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

Settings for the IReductionProcessor class. Handles all the settings for Simplygon’s simplification algorithms. The user can tell the reduction processor which features are important by using the “FeatureFlags” parameter, and also the relative importance of these features using the Set{feature}Importance methods. Also settings for things like symmetry are set here.

Definition at line 11194 of file SimplygonSDK.h.

Member Function Documentation

◆ GetAllowDegenerateTexCoords()

virtual bool SimplygonSDK::IReductionSettings::GetAllowDegenerateTexCoords ( )
pure virtual

Get the AllowDegenerateTexCoords flag. If true, texture coordinates are allowed to become degenerate (triangles can have 0 area in texture space). This may sometimes look better, but if tangent space normals are used, tangent spaces may become degenerate.

Returns
the current value of the AllowDegenerateTexCoords bool

◆ GetClass()

virtual const char* SimplygonSDK::IReductionSettings::GetClass ( )
virtual

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::ISettingsObject.

◆ GetCreateGeomorphGeometry()

virtual bool SimplygonSDK::IReductionSettings::GetCreateGeomorphGeometry ( )
pure virtual

Get the CreateGeomorphGeometry value. If set, the reducer will create a GeometryData object that is a morphed version of the original GeometryData, that can be used to morph between the original geometry and the reduced geometry. Should not be used together with TJunctionRemover, NormalRecalculation or Material LOD.

Returns
the current value of the CreateGeomorphGeometry bool

◆ GetCurvatureImportance()

virtual real SimplygonSDK::IReductionSettings::GetCurvatureImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetDataCreationPreferences()

virtual unsigned int SimplygonSDK::IReductionSettings::GetDataCreationPreferences ( )
pure virtual

Get the flag that specifies how big "freedom" Simplygon has when it comes to altering vertex/triangle data. Allowing more altered data means it will be easier to create good looking LODs, but without altered data it will be easier to keep the memory-usage in the LOD-chain more optimized. Possible options are:

  • SG_DATACREATIONPREFERENCES_ONLY_USE_ORIGINAL_DATA
  • SG_DATACREATIONPREFERENCES_PREFER_ORIGINAL_DATA
  • SG_DATACREATIONPREFERENCES_PREFER_OPTIMIZED_RESULT

Note: When using SG_DATACREATIONPREFERENCES_USE_ONLY_ORIGINAL_DATA, the geometry being reduced can not have a node transformation matrix other than the identity matrix.

Returns
the current value of the DataCreationPreferences flag.

◆ GetEdgeSetImportance()

virtual real SimplygonSDK::IReductionSettings::GetEdgeSetImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetGenerateGeomorphData()

virtual bool SimplygonSDK::IReductionSettings::GetGenerateGeomorphData ( )
pure virtual

Get the flag for if the reduction process should store geomorph data in the processed GeometryData object. This data is an array with same size as the vertexcount was before the reduction process, and will have the coordinates for each vertex on its corresponding position on the reduced GeometryData's surface. Can be used to give smooth transition from a highlevel LOD to a lowlevel LOD. This array can be accessed with " GeomObj->GetCustomField( "SgMappedVertexCoords" ) "

Returns
the current value of the GenerateGeomorphData bool

◆ GetGeometryImportance()

virtual real SimplygonSDK::IReductionSettings::GetGeometryImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetGroupImportance()

virtual real SimplygonSDK::IReductionSettings::GetGroupImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetInwardMoveMultiplier()

virtual real SimplygonSDK::IReductionSettings::GetInwardMoveMultiplier ( )
pure virtual

Get the inward move multiplier, how much the mesh is allowed to shrink its silhouette perimeter

Returns
the current value of InwardMoveMultiplier

◆ GetKeepSymmetry()

virtual bool SimplygonSDK::IReductionSettings::GetKeepSymmetry ( )
pure virtual

Get the KeepSymmetry flag. If set, the reducer will detect symmetric features, and retain symmetry during processing. Please note that for a geometry to be considered symmetrical, also the texture coordinates must be mirrored.

Returns
the current value of the KeepSymmetry bool

◆ GetLockGeometricBorder()

virtual bool SimplygonSDK::IReductionSettings::GetLockGeometricBorder ( )
pure virtual

If set, will lock the geometric border of the geometry, and not reduce at all. This setting might be useful if the geometry needs to fit a neighbor geometry, but will reduce overall reduction quality (geometric quality over reduction ratio)

Returns
the current LockGeometricBorder flag

◆ GetMaterialImportance()

virtual real SimplygonSDK::IReductionSettings::GetMaterialImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetMaxDeviation()

virtual real SimplygonSDK::IReductionSettings::GetMaxDeviation ( )
pure virtual

Get the MaxDeviation value, the maximum surface-deviation between the reduced geometry and the original.

Returns
the current value of MaxDeviation

◆ GetMaxEdgeLength()

virtual real SimplygonSDK::IReductionSettings::GetMaxEdgeLength ( )
pure virtual

Gets the maximum length of the triangles edges after reduction. Can be used to limit output triangle size.

Returns
the current value of MaxEdgeLength

◆ GetMergeGeometries()

virtual bool SimplygonSDK::IReductionSettings::GetMergeGeometries ( )
pure virtual

The processor will merge all the geometries in the scene into a single geometry if MergeGeometries is enabled.

Returns
the current MergeGeometries flag

◆ GetOnScreenSize()

virtual unsigned int SimplygonSDK::IReductionSettings::GetOnScreenSize ( )
pure virtual

Get the OnScreenSize value, used to calculate the maximum surface-deviation allowed, by assuming errors less than 1 pixel onscreen will not be noticable

Returns
the current value of OnScreenSize

◆ GetOutwardMoveMultiplier()

virtual real SimplygonSDK::IReductionSettings::GetOutwardMoveMultiplier ( )
pure virtual

Get the outward move multiplier, how much the mesh is allowed to grow its silhouette perimeter

Returns
the current value of OutwardMoveMultiplier

◆ GetProcessSelectionSetID()

virtual rid SimplygonSDK::IReductionSettings::GetProcessSelectionSetID ( )
pure virtual

Selects which SelectionSet should be processed. If set to -1, all geometries in the scene will be processed.

Returns
the current SelectionSet id

◆ GetProcessSelectionSetName()

virtual rstring SimplygonSDK::IReductionSettings::GetProcessSelectionSetName ( )
pure virtual

Selects which SelectionSet should be processed. If set to NULL, all geometries in the scene will be processed. If both ID and Name are set, ID will be used.

Returns
the current SelectionSet name

◆ GetReductionHeuristics()

virtual unsigned int SimplygonSDK::IReductionSettings::GetReductionHeuristics ( )
pure virtual

Get the flag that decides how precise the reducer will be during the mesh reduction.

  • SG_REDUCTIONHEURISTICS_FAST -> Reducer will be faster, but onscreensize and trianglecount will not match perfectly.
  • SG_REDUCTIONHEURISTICS_CONSISTENT -> Reducer will be slower, but onscreensize and trianglecount will consistently give matching results.
Returns
the current value of ReductionHeuristics.

◆ GetReductionTargets()

virtual unsigned int SimplygonSDK::IReductionSettings::GetReductionTargets ( )
pure virtual

Get the flag mask that decides what types of reduction targets will be used

  • SG_REDUCTIONTARGET_TRIANGLECOUNT -> the reducer will stop when the set triangle-count has been reached.
  • SG_REDUCTIONTARGET_TRIANGLERATIO -> the reducer will stop when the set triangle-ratio has been reached.
  • SG_REDUCTIONTARGET_MAXDEVIATION -> the reducer will stop when the set max deviation has been reached.
  • SG_REDUCTIONTARGET_ONSCREENSIZE -> the reducer will stop when the asset will visually pass for the original at the set pixel size.
Returns
the current value of ReductionTargets.

◆ GetShadingImportance()

virtual real SimplygonSDK::IReductionSettings::GetShadingImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetSkinningImportance()

virtual real SimplygonSDK::IReductionSettings::GetSkinningImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetStopCondition()

virtual unsigned int SimplygonSDK::IReductionSettings::GetStopCondition ( )
pure virtual

Get the stop condition for the reducer.

  • SG_STOPCONDITION_ANY -> the reducer will stop when any single one of the set reduction targets have been reached
  • SG_STOPCONDITION_ALL -> the reducer will stop when all enabled reduction targets have been set.

◆ GetSymmetryAxis()

virtual unsigned int SimplygonSDK::IReductionSettings::GetSymmetryAxis ( )
pure virtual

Get what axis to be used for symmetry calculations.

Returns
the current value of SymmetryAxis.
  • 0 = x
  • 1 = y
  • 2 = z

◆ GetSymmetryDetectionTolerance()

virtual real SimplygonSDK::IReductionSettings::GetSymmetryDetectionTolerance ( )
pure virtual

Get the SymmetryDetectionTolerance, the tolerance used when detecting symmetry. Values in the ranges 1e-5 to 1e-3 will usually produce good results. This specific tolerance corresponds to the off-plane tolerance, ie. the tolerance of the coordinate components that are not the symmetry axis. The in-plane tolerance is always 10 times the off-plane tolerance. This value is relative to the size of the Geometry, so 0.01 would mean 1% of the bounding box size of the Geometry.

Returns
the current value of SymmetryDetectionTolerance

◆ GetSymmetryOffset()

virtual real SimplygonSDK::IReductionSettings::GetSymmetryOffset ( )
pure virtual

Get SymmetryOffset, the position on the symmetry axis where the symmetry plane is placed.

Returns
the current value of SymmetryOffset

◆ GetTextureImportance()

virtual real SimplygonSDK::IReductionSettings::GetTextureImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetTriangleCount()

virtual unsigned int SimplygonSDK::IReductionSettings::GetTriangleCount ( )
pure virtual

Get the wanted reduction ratio. The range is 0->inf.

Returns
the current value of TriangleCount

◆ GetTriangleRatio()

virtual real SimplygonSDK::IReductionSettings::GetTriangleRatio ( )
pure virtual

Get the wanted reduction ratio. The range is 0->1.

Returns
the current value of ReductionRatio. Default value is 1

◆ GetUseAutomaticSymmetryDetection()

virtual bool SimplygonSDK::IReductionSettings::GetUseAutomaticSymmetryDetection ( )
pure virtual

Get the AutomaticSymmetryDetection flag. If set, and KeepSymmetry is on, the reducer will automatically detect and use any X,Y,Z symmetry plane and will override any user set symmetry plane with the detected one. If no symmetry is found, KeepSymmetry will be turned off before reduction.

Returns
the current value of the AutomaticSymmetryDetection bool

◆ GetUseHighQualityNormalCalculation()

virtual bool SimplygonSDK::IReductionSettings::GetUseHighQualityNormalCalculation ( )
pure virtual

Get the "UseHighQualityNormalCalculation" flag, which decided if the reducer will do a much more precise way of calculating the vertex normals or not.

Returns
the current value of the UseHighQualityNormalCalculation bool

◆ GetUseSymmetryQuadRetriangulator()

virtual bool SimplygonSDK::IReductionSettings::GetUseSymmetryQuadRetriangulator ( )
pure virtual

Get the UseSymmetryQuadRetriangulator flag. If true, and KeepSymmetry is on, any triangles that have been triangulated from symmetrical quads into unsymmetrical triangles are detected and fixed. The edges of said triangles are flipped across the old quad so that the mesh becomes symmetrical again.

Returns
the current value of the UseSymmetryQuadRetriangulator bool

◆ GetUseVertexWeights()

virtual bool SimplygonSDK::IReductionSettings::GetUseVertexWeights ( )
pure virtual

Get the UseVertexWeighting value. If set, the reducer will weight the reduction based on the weights in the "VertexWeighting" vertex field.

Returns
the current value of the UseVertexWeights bool

◆ GetVertexColorImportance()

virtual real SimplygonSDK::IReductionSettings::GetVertexColorImportance ( )
pure virtual

Get the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Returns
the current value of the importance of the feature

◆ GetWeightsFromColorChannelID()

virtual rid SimplygonSDK::IReductionSettings::GetWeightsFromColorChannelID ( )
pure virtual

If an id is set, the first component in the color channel will be converted into vertex weights. If a WeightsFromColorChannelName is set, it will override this id.

Returns
the current WeightsFromColorChannelID

◆ GetWeightsFromColorChannelName()

virtual rstring SimplygonSDK::IReductionSettings::GetWeightsFromColorChannelName ( )
pure virtual

If a name is set, the first component in the color channel will be converted into vertex weights.

Returns
the current WeightsFromColorChannelName

◆ IsA()

virtual bool SimplygonSDK::IReductionSettings::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::ISettingsObject.

◆ IsClassA()

static bool SimplygonSDK::IReductionSettings::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if IReductionSettings is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 11215 of file SimplygonSDK.h.

◆ SafeCast()

static IReductionSettings* SimplygonSDK::IReductionSettings::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a IReductionSettings pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a IReductionSettings pointer
Returns
a pointer to the IReductionSettings object, if the cast can be made, and a NULL pointer otherwise

Definition at line 11228 of file SimplygonSDK.h.

◆ SetAllowDegenerateTexCoords()

virtual void SimplygonSDK::IReductionSettings::SetAllowDegenerateTexCoords ( bool  value)
pure virtual

Set the AllowDegenerateTexCoords flag. If true, texture coordinates are allowed to become degenerate (triangles can have 0 area in texture space). This may sometimes look better, but if tangent space normals are used, tangent spaces may become degenerate.

Parameters
valueis the bool to which AllowDegenerateTexCoords will be set

◆ SetCreateGeomorphGeometry()

virtual void SimplygonSDK::IReductionSettings::SetCreateGeomorphGeometry ( bool  value)
pure virtual

Set the CreateGeomorphGeometry value. If set, the reducer will create a GeometryData object that is a morphed version of the original GeometryData, that can be used to morph between the original geometry and the reduced geometry. Should not be used together with TJunctionRemover, NormalRecalculation or Material LOD.

Parameters
valueis the bool to which CreateGeomorphGeometry will be set

◆ SetCurvatureImportance()

virtual void SimplygonSDK::IReductionSettings::SetCurvatureImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetDataCreationPreferences()

virtual void SimplygonSDK::IReductionSettings::SetDataCreationPreferences ( unsigned int  value)
pure virtual

Set the flag that specifies how big "freedom" Simplygon has when it comes to altering vertex/triangle data. Allowing more altered data means it will be easier to create good looking LODs, but without altered data it will be easier to keep the memory-usage in the LOD-chain more optimized. Possible options are:

  • SG_DATACREATIONPREFERENCES_ONLY_USE_ORIGINAL_DATA
  • SG_DATACREATIONPREFERENCES_PREFER_ORIGINAL_DATA
  • SG_DATACREATIONPREFERENCES_PREFER_OPTIMIZED_RESULT

Note: When using SG_DATACREATIONPREFERENCES_USE_ONLY_ORIGINAL_DATA, the geometry being reduced can not have a node transformation matrix other than the identity matrix.

Parameters
valueis the value to which the DataCreationPreferences flag will be set. Value cannot be less than SG_DATACREATIONPREFERENCES_ONLY_USE_ORIGINAL_DATA. Value cannot be greater than SG_DATACREATIONPREFERENCES_PREFER_OPTIMIZED_RESULT.

◆ SetEdgeSetImportance()

virtual void SimplygonSDK::IReductionSettings::SetEdgeSetImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetGenerateGeomorphData()

virtual void SimplygonSDK::IReductionSettings::SetGenerateGeomorphData ( bool  value)
pure virtual

Set the flag for if the reduction process should store geomorph data in the processed GeometryData object. This data is an array with same size as the vertexcount was before the reduction process, and will have the coordinates for each vertex on its corresponding position on the reduced GeometryData's surface. Can be used to give smooth transition from a highlevel LOD to a lowlevel LOD. This array can be accessed with " GeomObj->GetCustomField( "SgMappedVertexCoords" ) "

Parameters
valueis the bool to which GenerateGeomorphData will be set

◆ SetGeometryImportance()

virtual void SimplygonSDK::IReductionSettings::SetGeometryImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetGroupImportance()

virtual void SimplygonSDK::IReductionSettings::SetGroupImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetInwardMoveMultiplier()

virtual void SimplygonSDK::IReductionSettings::SetInwardMoveMultiplier ( real  value)
pure virtual

Set the inward move multiplier, how much the mesh is allowed to shrink its silhouette perimeter

Parameters
valueis the value to which InwardMoveMultiplier will be set

◆ SetKeepSymmetry()

virtual void SimplygonSDK::IReductionSettings::SetKeepSymmetry ( bool  value)
pure virtual

Set the KeepSymmetry flag. If set, the reducer will detect symmetric features, and retain symmetry during processing. Please note that for a geometry to be considered symmetrical, also the texture coordinates must be mirrored.

Parameters
valueis the bool to which KeepSymmetry will be set

◆ SetLockGeometricBorder()

virtual void SimplygonSDK::IReductionSettings::SetLockGeometricBorder ( bool  value)
pure virtual

If set, will lock the geometric border of the geometry, and not reduce at all. This setting might be useful if the geometry needs to fit a neighbor geometry, but will reduce overall reduction quality (geometric quality over reduction ratio)

Parameters
valuethe desired LockGeometricBorder flag

◆ SetMaterialImportance()

virtual void SimplygonSDK::IReductionSettings::SetMaterialImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetMaxDeviation()

virtual void SimplygonSDK::IReductionSettings::SetMaxDeviation ( real  value)
pure virtual

Set the MaxDeviation value, the maximum surface-deviation between the reduced geometry and the original.

Parameters
valueis the value to which MaxDeviation will be set Value cannot be less than 0.

◆ SetMaxEdgeLength()

virtual void SimplygonSDK::IReductionSettings::SetMaxEdgeLength ( real  value)
pure virtual

Sets the maximum length of the triangles edges after reduction. Can be used to limit output triangle size.

Parameters
valueis the new value of MaxEdgeLength Value cannot be less than 0.

◆ SetMergeGeometries()

virtual void SimplygonSDK::IReductionSettings::SetMergeGeometries ( bool  value)
pure virtual

The processor will merge all the geometries in the scene into a single geometry if MergeGeometries is enabled.

Parameters
valuethe desired MergeGeometries flag

◆ SetOnScreenSize()

virtual void SimplygonSDK::IReductionSettings::SetOnScreenSize ( unsigned int  value)
pure virtual

Set the OnScreenSize value, used to calculate the maximum surface-deviation allowed, by assuming errors less than 1 pixel onscreen will not be noticable

Parameters
valueis the value to which OnScreenSize will be set Value cannot be less than 1. Value cannot be greater than 1000000.

◆ SetOutwardMoveMultiplier()

virtual void SimplygonSDK::IReductionSettings::SetOutwardMoveMultiplier ( real  value)
pure virtual

Set the outward move multiplier, how much the mesh is allowed to grow its silhouette perimeter

Parameters
valueis the value to which OutwardMoveMultiplier will be set

◆ SetProcessSelectionSetID()

virtual void SimplygonSDK::IReductionSettings::SetProcessSelectionSetID ( rid  value)
pure virtual

Selects which SelectionSet should be processed. If set to -1, all geometries in the scene will be processed.

Parameters
valuethe desired SelectionSet id Value cannot be less than -1.

◆ SetProcessSelectionSetName()

virtual void SimplygonSDK::IReductionSettings::SetProcessSelectionSetName ( const char *  value)
pure virtual

Selects which SelectionSet should be processed. If SetName is not found, all geometries in the scene will be processed. If both ID and Name are set, ID will be used.

Parameters
valuethe desired SelectionSet name

◆ SetReductionHeuristics()

virtual void SimplygonSDK::IReductionSettings::SetReductionHeuristics ( unsigned int  value)
pure virtual

Set the flag that decides how precise the reducer will be during the mesh reduction.

  • SG_REDUCTIONHEURISTICS_FAST -> Reducer will be faster, but onscreensize and trianglecount will not match perfectly.
  • SG_REDUCTIONHEURISTICS_CONSISTENT -> Reducer will be slower, but onscreensize and trianglecount will consistently give matching results.
Parameters
valueis the ReductionHeuristics to use. Value cannot be less than SG_REDUCTIONHEURISTICS_FAST. Value cannot be greater than SG_REDUCTIONHEURISTICS_CONSISTENT.
Returns
the current value of ReductionHeuristics.

◆ SetReductionTargets()

virtual void SimplygonSDK::IReductionSettings::SetReductionTargets ( unsigned int  value)
pure virtual

Set the flag mask that decides what types of reduction targets will be used

  • SG_REDUCTIONTARGET_TRIANGLECOUNT -> the reducer will stop when the set triangle-count has been reached.
  • SG_REDUCTIONTARGET_TRIANGLERATIO -> the reducer will stop when the set triangle-ratio has been reached.
  • SG_REDUCTIONTARGET_MAXDEVIATION -> the reducer will stop when the set max deviation has been reached.
  • SG_REDUCTIONTARGET_ONSCREENSIZE -> the reducer will stop when the asset will visually pass for the original at the set pixel size.
Parameters
valueis the flag mask to which ReductionTargets will be set. Value cannot be greater than SG_REDUCTIONTARGET_ALL.

◆ SetShadingImportance()

virtual void SimplygonSDK::IReductionSettings::SetShadingImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetSkinningImportance()

virtual void SimplygonSDK::IReductionSettings::SetSkinningImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetStopCondition()

virtual void SimplygonSDK::IReductionSettings::SetStopCondition ( unsigned int  value)
pure virtual

Set the stop condition for the reducer.

  • SG_STOPCONDITION_ANY -> the reducer will stop when any single one of the set reduction targets have been reached
  • SG_STOPCONDITION_ALL -> the reducer will stop when all enabled reduction targets have been set.
Parameters
valueis the flag to which StopCondition will be set. Value cannot be less than SG_STOPCONDITION_ANY. Value cannot be greater than SG_STOPCONDITION_ALL.

◆ SetSymmetryAxis()

virtual void SimplygonSDK::IReductionSettings::SetSymmetryAxis ( unsigned int  value)
pure virtual

Set what axis to be used for symmetry calculations.

Parameters
valueis the value to which SymmetryAxis will be set.
  • 0 = x
  • 1 = y
  • 2 = z
Value cannot be less than 0. Value cannot be greater than 2.

◆ SetSymmetryDetectionTolerance()

virtual void SimplygonSDK::IReductionSettings::SetSymmetryDetectionTolerance ( real  value)
pure virtual

Set the SymmetryDetectionTolerance, the tolerance used when detecting symmetry. Values in the ranges 1e-5 to 1e-3 will usually produce good results. This specific tolerance corresponds to the off-plane tolerance, ie. the tolerance of the coordinate components that are not the symmetry axis. The in-plane tolerance is always 10 times the off-plane tolerance. This value is relative to the size of the Geometry, so 0.01 would mean 1% of the bounding box size of the Geometry.

Parameters
valueis the value to which SymmetryDetectionTolerance will be set

◆ SetSymmetryOffset()

virtual void SimplygonSDK::IReductionSettings::SetSymmetryOffset ( real  value)
pure virtual

Set SymmetryOffset, the position on the symmetry axis where the symmetry plane is placed.

Parameters
valueis the value to which SymmetryOffset will be set

◆ SetTextureImportance()

virtual void SimplygonSDK::IReductionSettings::SetTextureImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetTriangleCount()

virtual void SimplygonSDK::IReductionSettings::SetTriangleCount ( unsigned int  value)
pure virtual

Set the wanted triangle count. The range is 0->inf.

Parameters
valueis the value to which TriangleCount will be set Value cannot be less than 0.

◆ SetTriangleRatio()

virtual void SimplygonSDK::IReductionSettings::SetTriangleRatio ( real  value)
pure virtual

Set the wanted reduction ratio. The range is 0->1.

Parameters
valueis the value to which ReductionRatio will be set Value cannot be less than 0. Value cannot be greater than 1.

◆ SetUseAutomaticSymmetryDetection()

virtual void SimplygonSDK::IReductionSettings::SetUseAutomaticSymmetryDetection ( bool  value)
pure virtual

Set the AutomaticSymmetryDetection flag. If set, and KeepSymmetry is on, the reducer will detect any X,Y,Z symmetry plane and will override any user set symmetry plane with the detected one. If no symmetry is found, KeepSymmetry will be turned off before reduction.

Parameters
valueis the bool to which AutomaticSymmetryDetection will be set

◆ SetUseHighQualityNormalCalculation()

virtual void SimplygonSDK::IReductionSettings::SetUseHighQualityNormalCalculation ( bool  value)
pure virtual

Set to true and the reducer will do a much more precise way of calculating the vertex normals. It will however be slower. Set to false and it will do a much more rough estimation of what the vertex normals will look like, but faster.

Parameters
valueis the value to which UseHighQualityNormalCalculation will be set

◆ SetUseSymmetryQuadRetriangulator()

virtual void SimplygonSDK::IReductionSettings::SetUseSymmetryQuadRetriangulator ( bool  value)
pure virtual

Set the UseSymmetryQuadRetriangulator flag. If true, and KeepSymmetry is on, any triangles that have been triangulated from symmetrical quads into unsymmetrical triangles are detected and fixed. The edges of said triangles are flipped across the old quad so that the mesh becomes symmetrical again.

Parameters
valueis the bool to which UseSymmetryQuadRetriangulator will be set

◆ SetUseVertexWeights()

virtual void SimplygonSDK::IReductionSettings::SetUseVertexWeights ( bool  value)
pure virtual

Set the UseVertexWeighting value. If set, the reducer will weight the reduction based on the weights in the "VertexWeighting" vertex field.

Parameters
valueis the bool to which UseVertexWeights will be set

◆ SetVertexColorImportance()

virtual void SimplygonSDK::IReductionSettings::SetVertexColorImportance ( real  value)
pure virtual

Set the importance value of the relevant feature, meaning the relative importance of the specific mesh feature (or disabling an importance entirely by setting it to 0.0). The default importance value is 1. A higher number means higher importance.

Parameters
valueis the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE.

◆ SetWeightsFromColorChannelID()

virtual void SimplygonSDK::IReductionSettings::SetWeightsFromColorChannelID ( rid  value)
pure virtual

If an id is set, the first component in the color channel will be converted into vertex weights. If a WeightsFromColorChannelName is set, it will override this id.

Parameters
valuethe desired WeightsFromColorChannelID

◆ SetWeightsFromColorChannelName()

virtual void SimplygonSDK::IReductionSettings::SetWeightsFromColorChannelName ( const char *  value)
pure virtual

If a name is set, the first component in the color channel will be converted into vertex weights.

Parameters
valuethe desired WeightsFromColorChannelName

The documentation for this class was generated from the following file: