class
BoneSettings
Settings for the Simplygon Reduction/Remeshing classes With the BoneSettings object, the user can setup all the parameters for how the BoneLOD processor should simplify the links between geometries and bones. Bones can be un-linked from the geometry either with a set ratio or depending on a selected pixel size on screen.
Properties
Property | Description |
BoneReductionTargetBoneCount | The desired bone count. The range is 0->inf. |
BoneReductionTargetBoneCountEnabled | Enable bone count as a reduction target. The reducer will stop when the set bone count has been reached. |
BoneReductionTargetBoneRatio | The desired bone reduction ratio. The range is 0->1. |
BoneReductionTargetBoneRatioEnabled | Enable bone ratio as a reduction target. The reducer will stop when the set bone-ratio has been reached. |
BoneReductionTargetMaxDeviation | The MaxDeviation value, the maximum surface-deviation between the reduced geometry and the original. |
BoneReductionTargetMaxDeviationEnabled | Enable max deviation as a reduction target. The reducer will stop when the set max deviation has been reached. |
BoneReductionTargetOnScreenSize | The OnScreenSize value, the maximum surface-deviation between the reduced geometry and the original. |
BoneReductionTargetOnScreenSizeEnabled | Enable on screen size as a reduction target. The reducer will stop when the set on screen size has been reached. |
BoneReductionTargetStopCondition | The stop condition for the bone reducer. Any: the reducer will stop when any single one of the set reduction targets have been reached. All: the reducer will stop when all enabled reduction targets have been set. |
LimitBonesPerVertex | Decides whether unused bones should be removed. |
LockBoneSelectionSetID | The ID of the selection set that contains all of the bones that will be locked, and cannot be removed in the BoneLOD process. If a bone is locked, all its ancestors will be locked also. If the ID is -1, then no bones are selected. |
LockBoneSelectionSetName | The name of the selection set that contains all of the bones that will be locked, and cannot be removed in the BoneLOD process. If a bone is locked, all its ancestors will be locked also. If both name and id are set for the locked selection set, the name will be used. |
MaxBonePerVertex | Decides the maximum limit of how many bones can be connected to each vertex. If for example set to 1, then each vertex will only be linked to 1 bone. |
RemoveBoneSelectionSetID | The ID of the selection set that contains all of the bones that will be forced to be removed in the BoneLOD process, UNLESS they are locked. If a bone is set to be removed, all its descendants will be removed also. If both name and id are set for the remove selection set, the name will be used. |
RemoveBoneSelectionSetName | The name of the selection set that contains all of the bones that will be forced to be removed in the BoneLOD process, UNLESS they are locked. If a bone is set to be removed, all its descendants will be removed also. If both name and id are set for the remove selection set, the name will be used. |
RemoveUnusedBones | Decides whether unused bones should be removed. |
UseBoneReducer | Enables or disables the bone reduction processing that actually removes bones. Even with this flag off, the bones per vertex can still be limited. |
Methods
Method | Description |
GetClass | Get the name of the BoneSettings class. |
GetErrorString | Returns a string describing the error that was found the last time ValidateSettings was performed. |
IsA | Returns true if BoneSettings is a or is a descendant of the class named as the type parameter. |
IsNull | Returns true if the BoneSettings object is invalid. |
SetBoneReductionTargets | Set bone reduction targets and stop condition used in the bone reduction. |
ValidateSettings | Validates the current settings values. |
Static methods
Method | Description |
IsClassA | Returns true if the class is a or is a descendant of the class named as the type parameter. |
SafeCast | SafeCast makes sure the input object is of a class that can be cast into spBoneSettings, and if this is the case, returns the object cast into spBoneSettings. |
Properties details
BoneReductionTargetBoneCount
The desired bone count. The range is 0->inf.
Syntax
SetBoneReductionTargetBoneCount parameters
Type | Name | Min | Max | Description |
unsigned int | value | 0 | UINT_MAX | The value to which BoneCount will be set. |
GetBoneReductionTargetBoneCount return value
Type: unsigned int
Default: 100
Syntax
SetBoneReductionTargetBoneCount parameters
Type | Name | Min | Max | Description |
uint | value | 0 | UINT_MAX | The value to which BoneCount will be set. |
GetBoneReductionTargetBoneCount return value
Type: uint
Default: 100
Syntax
SetBoneReductionTargetBoneCount parameters
Name | Type | Min | Max | Description |
value | int | 0 | UINT_MAX | The value to which BoneCount will be set. |
GetBoneReductionTargetBoneCount return value
Type: int
Default: 100
BoneReductionTargetBoneCountEnabled
Enable bone count as a reduction target. The reducer will stop when the set bone count has been reached.
Syntax
SetBoneReductionTargetBoneCountEnabled parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired value of BoneCountEnabled. |
GetBoneReductionTargetBoneCountEnabled return value
Type: bool
Default: false
Syntax
SetBoneReductionTargetBoneCountEnabled parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired value of BoneCountEnabled. |
GetBoneReductionTargetBoneCountEnabled return value
Type: bool
Default: false
Syntax
SetBoneReductionTargetBoneCountEnabled parameters
Name | Type | Min | Max | Description |
value | bool | | | The desired value of BoneCountEnabled. |
GetBoneReductionTargetBoneCountEnabled return value
Type: bool
Default: false
BoneReductionTargetBoneRatio
The desired bone reduction ratio. The range is 0->1.
Syntax
SetBoneReductionTargetBoneRatio parameters
Type | Name | Min | Max | Description |
real | value | 0 | 1 | The value to which ReductionRatio will be set. |
GetBoneReductionTargetBoneRatio return value
Type: real
Default: 0.5
Syntax
SetBoneReductionTargetBoneRatio parameters
Type | Name | Min | Max | Description |
float | value | 0 | 1 | The value to which ReductionRatio will be set. |
GetBoneReductionTargetBoneRatio return value
Type: float
Default: 0.5
Syntax
SetBoneReductionTargetBoneRatio parameters
Name | Type | Min | Max | Description |
value | float | 0 | 1 | The value to which ReductionRatio will be set. |
GetBoneReductionTargetBoneRatio return value
Type: float
Default: 0.5
BoneReductionTargetBoneRatioEnabled
Enable bone ratio as a reduction target. The reducer will stop when the set bone-ratio has been reached.
Syntax
SetBoneReductionTargetBoneRatioEnabled parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired value of BoneRatioEnabled. |
GetBoneReductionTargetBoneRatioEnabled return value
Type: bool
Default: true
Syntax
SetBoneReductionTargetBoneRatioEnabled parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired value of BoneRatioEnabled. |
GetBoneReductionTargetBoneRatioEnabled return value
Type: bool
Default: true
Syntax
SetBoneReductionTargetBoneRatioEnabled parameters
Name | Type | Min | Max | Description |
value | bool | | | The desired value of BoneRatioEnabled. |
GetBoneReductionTargetBoneRatioEnabled return value
Type: bool
Default: true
BoneReductionTargetMaxDeviation
The MaxDeviation value, the maximum surface-deviation between the reduced geometry and the original.
Syntax
SetBoneReductionTargetMaxDeviation parameters
Type | Name | Min | Max | Description |
real | value | 0 | REAL_MAX | The value to which MaxDeviation will be set. |
GetBoneReductionTargetMaxDeviation return value
Type: real
Default: 0.0
Syntax
SetBoneReductionTargetMaxDeviation parameters
Type | Name | Min | Max | Description |
float | value | 0 | REAL_MAX | The value to which MaxDeviation will be set. |
GetBoneReductionTargetMaxDeviation return value
Type: float
Default: 0.0
Syntax
SetBoneReductionTargetMaxDeviation parameters
Name | Type | Min | Max | Description |
value | float | 0 | REAL_MAX | The value to which MaxDeviation will be set. |
GetBoneReductionTargetMaxDeviation return value
Type: float
Default: 0.0
BoneReductionTargetMaxDeviationEnabled
Enable max deviation as a reduction target. The reducer will stop when the set max deviation has been reached.
Syntax
SetBoneReductionTargetMaxDeviationEnabled parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired value of MaxDeviationEnabled. |
GetBoneReductionTargetMaxDeviationEnabled return value
Type: bool
Default: false
Syntax
SetBoneReductionTargetMaxDeviationEnabled parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired value of MaxDeviationEnabled. |
GetBoneReductionTargetMaxDeviationEnabled return value
Type: bool
Default: false
Syntax
SetBoneReductionTargetMaxDeviationEnabled parameters
Name | Type | Min | Max | Description |
value | bool | | | The desired value of MaxDeviationEnabled. |
GetBoneReductionTargetMaxDeviationEnabled return value
Type: bool
Default: false
BoneReductionTargetOnScreenSize
The OnScreenSize value, the maximum surface-deviation between the reduced geometry and the original.
Syntax
SetBoneReductionTargetOnScreenSize parameters
Type | Name | Min | Max | Description |
unsigned int | value | 20 | 4000 | The value to which OnScreenSize will be set. |
GetBoneReductionTargetOnScreenSize return value
Type: unsigned int
Default: 300
Syntax
SetBoneReductionTargetOnScreenSize parameters
Type | Name | Min | Max | Description |
uint | value | 20 | 4000 | The value to which OnScreenSize will be set. |
GetBoneReductionTargetOnScreenSize return value
Type: uint
Default: 300
Syntax
SetBoneReductionTargetOnScreenSize parameters
Name | Type | Min | Max | Description |
value | int | 20 | 4000 | The value to which OnScreenSize will be set. |
GetBoneReductionTargetOnScreenSize return value
Type: int
Default: 300
BoneReductionTargetOnScreenSizeEnabled
Enable on screen size as a reduction target. The reducer will stop when the set on screen size has been reached.
Syntax
SetBoneReductionTargetOnScreenSizeEnabled parameters
Type | Name | Min | Max | Description |
bool | value | | | Value to set if on screen size should be used in the reduction. |
GetBoneReductionTargetOnScreenSizeEnabled return value
Type: bool
Default: false
Syntax
SetBoneReductionTargetOnScreenSizeEnabled parameters
Type | Name | Min | Max | Description |
bool | value | | | Value to set if on screen size should be used in the reduction. |
GetBoneReductionTargetOnScreenSizeEnabled return value
Type: bool
Default: false
Syntax
SetBoneReductionTargetOnScreenSizeEnabled parameters
Name | Type | Min | Max | Description |
value | bool | | | Value to set if on screen size should be used in the reduction. |
GetBoneReductionTargetOnScreenSizeEnabled return value
Type: bool
Default: false
BoneReductionTargetStopCondition
The stop condition for the bone reducer. Any: the reducer will stop when any single one of the set reduction targets have been reached. All: the reducer will stop when all enabled reduction targets have been set.
Syntax
SetBoneReductionTargetStopCondition parameters
Type | Name | Min | Max | Description |
EStopCondition | value | | | The flag to which StopCondition will be set. |
GetBoneReductionTargetStopCondition return value
Type: EStopCondition
Default: All
Key | Value | Comment |
Any | 0 | Simplygon will stop as soon as one of the reduction targets has been fulfilled. |
All | 1 | Simplygon will continue processing until all of the reduction targets have been fulfilled. |
Syntax
SetBoneReductionTargetStopCondition parameters
Type | Name | Min | Max | Description |
EStopCondition | value | | | The flag to which StopCondition will be set. |
GetBoneReductionTargetStopCondition return value
Type: ``````
Default: All
Key | Value | Comment |
Any | 0 | Simplygon will stop as soon as one of the reduction targets has been fulfilled. |
All | 1 | Simplygon will continue processing until all of the reduction targets have been fulfilled. |
Syntax
SetBoneReductionTargetStopCondition parameters
Name | Type | Min | Max | Description |
value | EStopCondition | | | The flag to which StopCondition will be set. |
GetBoneReductionTargetStopCondition return value
Type: EStopCondition
Default: All
Key | Value | Comment |
EStopCondition_Any | 0 | Simplygon will stop as soon as one of the reduction targets has been fulfilled. |
EStopCondition_All | 1 | Simplygon will continue processing until all of the reduction targets have been fulfilled. |
LimitBonesPerVertex
Decides whether unused bones should be removed.
Syntax
SetLimitBonesPerVertex parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired flag value. |
GetLimitBonesPerVertex return value
Type: bool
Default: false
Syntax
SetLimitBonesPerVertex parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired flag value. |
GetLimitBonesPerVertex return value
Type: bool
Default: false
Syntax
SetLimitBonesPerVertex parameters
Name | Type | Min | Max | Description |
value | bool | | | The desired flag value. |
GetLimitBonesPerVertex return value
Type: bool
Default: false
LockBoneSelectionSetID
The ID of the selection set that contains all of the bones that will be locked, and cannot be removed in the BoneLOD process. If a bone is locked, all its ancestors will be locked also. If the ID is -1, then no bones are selected.
Syntax
SetLockBoneSelectionSetID parameters
Type | Name | Min | Max | Description |
rid | value | -1 | | The ID of the selection set. |
GetLockBoneSelectionSetID return value
Type: rid
Default: -1
Syntax
SetLockBoneSelectionSetID parameters
Type | Name | Min | Max | Description |
rid | value | -1 | | The ID of the selection set. |
GetLockBoneSelectionSetID return value
Type: rid
Default: -1
Syntax
SetLockBoneSelectionSetID parameters
Name | Type | Min | Max | Description |
value | int | -1 | | The ID of the selection set. |
GetLockBoneSelectionSetID return value
Type: int
Default: -1
LockBoneSelectionSetName
The name of the selection set that contains all of the bones that will be locked, and cannot be removed in the BoneLOD process. If a bone is locked, all its ancestors will be locked also. If both name and id are set for the locked selection set, the name will be used.
Syntax
SetLockBoneSelectionSetName parameters
Type | Name | Min | Max | Description |
const char * | value | | | The name of the selection set. |
GetLockBoneSelectionSetName return value
Type: spString
Default: nullptr
Syntax
SetLockBoneSelectionSetName parameters
Type | Name | Min | Max | Description |
string | value | | | The name of the selection set. |
GetLockBoneSelectionSetName return value
Type: string
Default: null
Syntax
SetLockBoneSelectionSetName parameters
Name | Type | Min | Max | Description |
value | str | | | The name of the selection set. |
GetLockBoneSelectionSetName return value
Type: str
Default: None
MaxBonePerVertex
Decides the maximum limit of how many bones can be connected to each vertex. If for example set to 1, then each vertex will only be linked to 1 bone.
Syntax
SetMaxBonePerVertex parameters
Type | Name | Min | Max | Description |
unsigned int | value | 0 | UINT_MAX | The desired maximum bones per vertex. |
GetMaxBonePerVertex return value
Type: unsigned int
Default: 64
Syntax
SetMaxBonePerVertex parameters
Type | Name | Min | Max | Description |
uint | value | 0 | UINT_MAX | The desired maximum bones per vertex. |
GetMaxBonePerVertex return value
Type: uint
Default: 64
Syntax
SetMaxBonePerVertex parameters
Name | Type | Min | Max | Description |
value | int | 0 | UINT_MAX | The desired maximum bones per vertex. |
GetMaxBonePerVertex return value
Type: int
Default: 64
RemoveBoneSelectionSetID
The ID of the selection set that contains all of the bones that will be forced to be removed in the BoneLOD process, UNLESS they are locked. If a bone is set to be removed, all its descendants will be removed also. If both name and id are set for the remove selection set, the name will be used.
Syntax
SetRemoveBoneSelectionSetID parameters
Type | Name | Min | Max | Description |
rid | value | -1 | | The ID of the selection set. |
GetRemoveBoneSelectionSetID return value
Type: rid
Default: -1
Syntax
SetRemoveBoneSelectionSetID parameters
Type | Name | Min | Max | Description |
rid | value | -1 | | The ID of the selection set. |
GetRemoveBoneSelectionSetID return value
Type: rid
Default: -1
Syntax
SetRemoveBoneSelectionSetID parameters
Name | Type | Min | Max | Description |
value | int | -1 | | The ID of the selection set. |
GetRemoveBoneSelectionSetID return value
Type: int
Default: -1
RemoveBoneSelectionSetName
The name of the selection set that contains all of the bones that will be forced to be removed in the BoneLOD process, UNLESS they are locked. If a bone is set to be removed, all its descendants will be removed also. If both name and id are set for the remove selection set, the name will be used.
Syntax
SetRemoveBoneSelectionSetName parameters
Type | Name | Min | Max | Description |
const char * | value | | | The name of the selection set. |
GetRemoveBoneSelectionSetName return value
Type: spString
Default: nullptr
Syntax
SetRemoveBoneSelectionSetName parameters
Type | Name | Min | Max | Description |
string | value | | | The name of the selection set. |
GetRemoveBoneSelectionSetName return value
Type: string
Default: null
Syntax
SetRemoveBoneSelectionSetName parameters
Name | Type | Min | Max | Description |
value | str | | | The name of the selection set. |
GetRemoveBoneSelectionSetName return value
Type: str
Default: None
RemoveUnusedBones
Decides whether unused bones should be removed.
Syntax
SetRemoveUnusedBones parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired flag value. |
GetRemoveUnusedBones return value
Type: bool
Default: false
Syntax
SetRemoveUnusedBones parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired flag value. |
GetRemoveUnusedBones return value
Type: bool
Default: false
Syntax
SetRemoveUnusedBones parameters
Name | Type | Min | Max | Description |
value | bool | | | The desired flag value. |
GetRemoveUnusedBones return value
Type: bool
Default: false
UseBoneReducer
Enables or disables the bone reduction processing that actually removes bones. Even with this flag off, the bones per vertex can still be limited.
Syntax
SetUseBoneReducer parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired flag value. |
GetUseBoneReducer return value
Type: bool
Default: false
Syntax
SetUseBoneReducer parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired flag value. |
GetUseBoneReducer return value
Type: bool
Default: false
Syntax
SetUseBoneReducer parameters
Name | Type | Min | Max | Description |
value | bool | | | The desired flag value. |
GetUseBoneReducer return value
Type: bool
Default: false
Methods details
GetClass
Get the name of the BoneSettings class.
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: spString
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: string
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: str
GetErrorString
Returns a string describing the error that was found the last time ValidateSettings was performed.
Syntax
Parameters
GetErrorString takes no parameters.
Return value
Type: spString
Syntax
Parameters
GetErrorString takes no parameters.
Return value
Type: string
Syntax
Parameters
GetErrorString takes no parameters.
Return value
Type: str
IsA
Returns true if BoneSettings is a or is a descendant of the class named as the type parameter.
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if BoneSettings is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
string | type | | | Name of the class to check if BoneSettings is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
type | str | | | Name of the class to check if BoneSettings is, or is a descendant of. |
Return value
Type: bool
IsNull
Returns true if the BoneSettings object is invalid.
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
SetBoneReductionTargets
Set bone reduction targets and stop condition used in the bone reduction.
Syntax
Parameters
Type | Name | Min | Max | Description |
EStopCondition | stopCondition | | | The value to which BoneReductionTargetStopCondition will be set. |
bool | useBoneRatio | | | The value to which BoneReductionTargetBoneRatioEnabled will be set. |
bool | useBoneCount | | | The value to which BoneReductionTargetBoneCountEnabled will be set. |
bool | useMaxDeviation | | | The value to which BoneReductionTargetMaxDeviationEnabled will be set. |
bool | useOnScreenSize | | | The value to which BoneReductionTargetOnScreenSizeEnabled will be set. |
Syntax
Parameters
Type | Name | Min | Max | Description |
EStopCondition | stopCondition | | | The value to which BoneReductionTargetStopCondition will be set. |
bool | useBoneRatio | | | The value to which BoneReductionTargetBoneRatioEnabled will be set. |
bool | useBoneCount | | | The value to which BoneReductionTargetBoneCountEnabled will be set. |
bool | useMaxDeviation | | | The value to which BoneReductionTargetMaxDeviationEnabled will be set. |
bool | useOnScreenSize | | | The value to which BoneReductionTargetOnScreenSizeEnabled will be set. |
Syntax
Parameters
Name | Type | Min | Max | Description |
stopCondition | EStopCondition | | | The value to which BoneReductionTargetStopCondition will be set. |
useBoneRatio | bool | | | The value to which BoneReductionTargetBoneRatioEnabled will be set. |
useBoneCount | bool | | | The value to which BoneReductionTargetBoneCountEnabled will be set. |
useMaxDeviation | bool | | | The value to which BoneReductionTargetMaxDeviationEnabled will be set. |
useOnScreenSize | bool | | | The value to which BoneReductionTargetOnScreenSizeEnabled will be set. |
ValidateSettings
Validates the current settings values.
Syntax
Parameters
ValidateSettings takes no parameters.
Return value
Type: bool
Syntax
Parameters
ValidateSettings takes no parameters.
Return value
Type: bool
Syntax
Parameters
ValidateSettings takes no parameters.
Return value
Type: bool
Static methods details
IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter.
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
string | type | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
type | str | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
SafeCast
SafeCast makes sure the input object is of a class that can be cast into spBoneSettings, and if this is the case, returns the object cast into spBoneSettings.
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: BoneSettings
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: BoneSettings
Syntax
Parameters
Name | Type | Min | Max | Description |
object | Object | | | Object to cast. |
Return value
Type: BoneSettings