![]() |
Simplygon C++ API
8.3.35800.0
|
#include <SimplygonSDK.h>
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 |
![]() | |
virtual rstring | GetErrorString ()=0 |
virtual bool | ValidateSettings ()=0 |
![]() | |
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 IReductionSettings * | SafeCast (IObject *ptr) |
![]() | |
static bool | IsClassA (const char *type) |
static ISettingsObject * | SafeCast (IObject *ptr) |
![]() | |
static bool | IsClassA (const char *type) |
static IObject * | SafeCast (IObject *ptr) |
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.
|
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.
|
virtual |
GetClass returns the name of the class of the object.
Reimplemented from SimplygonSDK::ISettingsObject.
|
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.
|
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.
|
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:
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.
|
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.
|
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" ) "
|
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.
|
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.
|
pure virtual |
Get the inward move multiplier, how much the mesh is allowed to shrink its silhouette perimeter
|
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.
|
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)
|
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.
|
pure virtual |
Get the MaxDeviation value, the maximum surface-deviation between the reduced geometry and the original.
|
pure virtual |
Gets the maximum length of the triangles edges after reduction. Can be used to limit output triangle size.
|
pure virtual |
The processor will merge all the geometries in the scene into a single geometry if MergeGeometries is enabled.
|
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
|
pure virtual |
Get the outward move multiplier, how much the mesh is allowed to grow its silhouette perimeter
|
pure virtual |
Selects which SelectionSet should be processed. If set to -1, all geometries in the scene will be processed.
|
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.
|
pure virtual |
Get the flag that decides how precise the reducer will be during the mesh reduction.
|
pure virtual |
Get the flag mask that decides what types of reduction targets will be used
|
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.
|
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.
|
pure virtual |
Get the stop condition for the reducer.
|
pure virtual |
Get what axis to be used for symmetry calculations.
|
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.
|
pure virtual |
Get SymmetryOffset, the position on the symmetry axis where the symmetry plane is placed.
|
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.
|
pure virtual |
Get the wanted reduction ratio. The range is 0->inf.
|
pure virtual |
Get the wanted reduction ratio. The range is 0->1.
|
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.
|
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.
|
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.
|
pure virtual |
Get the UseVertexWeighting value. If set, the reducer will weight the reduction based on the weights in the "VertexWeighting" vertex field.
|
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.
|
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.
|
pure virtual |
If a name is set, the first component in the color channel will be converted into vertex weights.
|
virtual |
The IsA function returns true if the object is a or is a descendant of the class named as the type parameter
type | is the name of the class to check if the object is, or is a descendant of |
Reimplemented from SimplygonSDK::ISettingsObject.
|
inlinestatic |
The IsClassA function returns true if IReductionSettings is a or is a descendant of the class named as the type parameter
type | is the name of the class to check if the class is, or is a descendant of |
Definition at line 11215 of file SimplygonSDK.h.
|
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.
ptr | is the pointer to be cast into a IReductionSettings pointer |
Definition at line 11228 of file SimplygonSDK.h.
|
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.
value | is the bool to which AllowDegenerateTexCoords will be set |
|
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.
value | is the bool to which CreateGeomorphGeometry will be set |
|
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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_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:
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.
value | is 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. |
|
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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_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" ) "
value | is the bool to which GenerateGeomorphData will be set |
|
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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE. |
|
pure virtual |
Set the inward move multiplier, how much the mesh is allowed to shrink its silhouette perimeter
value | is the value to which InwardMoveMultiplier will be set |
|
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.
value | is the bool to which KeepSymmetry will be set |
|
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)
value | the desired LockGeometricBorder flag |
|
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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE. |
|
pure virtual |
Set the MaxDeviation value, the maximum surface-deviation between the reduced geometry and the original.
value | is the value to which MaxDeviation will be set Value cannot be less than 0. |
|
pure virtual |
Sets the maximum length of the triangles edges after reduction. Can be used to limit output triangle size.
value | is the new value of MaxEdgeLength Value cannot be less than 0. |
|
pure virtual |
The processor will merge all the geometries in the scene into a single geometry if MergeGeometries is enabled.
value | the desired MergeGeometries flag |
|
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
value | is the value to which OnScreenSize will be set Value cannot be less than 1. Value cannot be greater than 1000000. |
|
pure virtual |
Set the outward move multiplier, how much the mesh is allowed to grow its silhouette perimeter
value | is the value to which OutwardMoveMultiplier will be set |
|
pure virtual |
Selects which SelectionSet should be processed. If set to -1, all geometries in the scene will be processed.
value | the desired SelectionSet id Value cannot be less than -1. |
|
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.
value | the desired SelectionSet name |
|
pure virtual |
Set the flag that decides how precise the reducer will be during the mesh reduction.
value | is the ReductionHeuristics to use. Value cannot be less than SG_REDUCTIONHEURISTICS_FAST. Value cannot be greater than SG_REDUCTIONHEURISTICS_CONSISTENT. |
|
pure virtual |
Set the flag mask that decides what types of reduction targets will be used
value | is the flag mask to which ReductionTargets will be set. Value cannot be greater than SG_REDUCTIONTARGET_ALL. |
|
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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE. |
|
pure virtual |
Set the stop condition for the reducer.
value | is the flag to which StopCondition will be set. Value cannot be less than SG_STOPCONDITION_ANY. Value cannot be greater than SG_STOPCONDITION_ALL. |
|
pure virtual |
Set what axis to be used for symmetry calculations.
value | is the value to which SymmetryAxis will be set.
|
|
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.
value | is the value to which SymmetryDetectionTolerance will be set |
|
pure virtual |
Set SymmetryOffset, the position on the symmetry axis where the symmetry plane is placed.
value | is the value to which SymmetryOffset will be set |
|
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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_VALUE. |
|
pure virtual |
Set the wanted triangle count. The range is 0->inf.
value | is the value to which TriangleCount will be set Value cannot be less than 0. |
|
pure virtual |
Set the wanted reduction ratio. The range is 0->1.
value | is the value to which ReductionRatio will be set Value cannot be less than 0. Value cannot be greater than 1. |
|
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.
value | is the bool to which AutomaticSymmetryDetection will be set |
|
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.
value | is the value to which UseHighQualityNormalCalculation will be set |
|
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.
value | is the bool to which UseSymmetryQuadRetriangulator will be set |
|
pure virtual |
Set the UseVertexWeighting value. If set, the reducer will weight the reduction based on the weights in the "VertexWeighting" vertex field.
value | is the bool to which UseVertexWeights will be set |
|
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.
value | is the value to which the importance will be set Value cannot be less than 0. Value cannot be greater than SG_MAXIMUM_IMPORTANCE_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.
value | the desired WeightsFromColorChannelID |
|
pure virtual |
If a name is set, the first component in the color channel will be converted into vertex weights.
value | the desired WeightsFromColorChannelName |