# 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. |
Name | The name of the BoneSettings object. (Inherited from Object) |
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 |
---|---|
AddObserver | Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object) |
GetBoolParameter | Get a named parameter boolean value. (Inherited from SettingsObject) |
GetClass | Get the name of the BoneSettings class. (Inherited from Object) |
GetDoubleParameter | Get a named parameter floating point value. (Inherited from SettingsObject) |
GetErrorString | Returns a string describing the error that was found the last time ValidateSettings was performed. (Inherited from SettingsObject) |
GetIntParameter | Get a named parameter integer value. (Inherited from SettingsObject) |
GetStringParameter | Get a named parameter string value. (Inherited from SettingsObject) |
GetUIntParameter | Get a named parameter unsigned integer value. (Inherited from SettingsObject) |
IsA | Returns true if BoneSettings is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
IsNull | Returns true if the BoneSettings object is invalid. (Inherited from Object) |
IsSameObjectAs | Returns true if the BoneSettings object is valid. (Inherited from Object) |
NonNull | Returns true if the BoneSettings object is valid. (Inherited from Object) |
PrintInfo | Prints the content/info of the BoneSettings object to the log. (Inherited from Object) |
RemoveObserver | Removes a previously added observer object. (Inherited from Object) |
SetBoneReductionTargets | Set bone reduction targets and stop condition used in the bone reduction. |
SetBoolParameter | Set a named parameter boolean value. (Inherited from SettingsObject) |
SetDoubleParameter | Set a named parameter floating point value. (Inherited from SettingsObject) |
SetIntParameter | Set a named parameter integer value. (Inherited from SettingsObject) |
SetStringParameter | Set a named parameter string value. (Inherited from SettingsObject) |
SetUIntParameter | Set a named parameter unsigned integer value. (Inherited from SettingsObject) |
SetValidateParameterNames | Set if parameter names should be validated or not. Parameters that previously do not exist will generate and error if validation is enabled and be allowed if validation is disabled. (Inherited from SettingsObject) |
ToJSON | Get settings as JSON for debugging purposes. (Inherited from SettingsObject) |
ValidateSettings | Validates the current settings values. (Inherited from SettingsObject) |
# Static methods
Method | Description |
---|---|
IsClassA | Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
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. (Inherited from Object) |
# Properties details
# BoneReductionTargetBoneCount
The desired bone count. The range is 0->inf.
# Syntax
// Setter
void SetBoneReductionTargetBoneCount( unsigned int value ) const;
// Getter
unsigned int GetBoneReductionTargetBoneCount() const;
# 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
# BoneReductionTargetBoneCountEnabled
Enable bone count as a reduction target. The reducer will stop when the set bone count has been reached.
# Syntax
// Setter
void SetBoneReductionTargetBoneCountEnabled( bool value ) const;
// Getter
bool GetBoneReductionTargetBoneCountEnabled() const;
# SetBoneReductionTargetBoneCountEnabled parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
bool | value | The desired value of BoneCountEnabled. |
# GetBoneReductionTargetBoneCountEnabled return value
Type: bool
Default: false
# BoneReductionTargetBoneRatio
The desired bone reduction ratio. The range is 0->1.
# Syntax
// Setter
void SetBoneReductionTargetBoneRatio( real value ) const;
// Getter
real GetBoneReductionTargetBoneRatio() const;
# 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
# BoneReductionTargetBoneRatioEnabled
Enable bone ratio as a reduction target. The reducer will stop when the set bone-ratio has been reached.
# Syntax
// Setter
void SetBoneReductionTargetBoneRatioEnabled( bool value ) const;
// Getter
bool GetBoneReductionTargetBoneRatioEnabled() const;
# SetBoneReductionTargetBoneRatioEnabled parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
bool | value | 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
// Setter
void SetBoneReductionTargetMaxDeviation( real value ) const;
// Getter
real GetBoneReductionTargetMaxDeviation() const;
# 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
# BoneReductionTargetMaxDeviationEnabled
Enable max deviation as a reduction target. The reducer will stop when the set max deviation has been reached.
# Syntax
// Setter
void SetBoneReductionTargetMaxDeviationEnabled( bool value ) const;
// Getter
bool GetBoneReductionTargetMaxDeviationEnabled() const;
# SetBoneReductionTargetMaxDeviationEnabled parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
bool | value | 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
// Setter
void SetBoneReductionTargetOnScreenSize( unsigned int value ) const;
// Getter
unsigned int GetBoneReductionTargetOnScreenSize() const;
# 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
# BoneReductionTargetOnScreenSizeEnabled
Enable on screen size as a reduction target. The reducer will stop when the set on screen size has been reached.
# Syntax
// Setter
void SetBoneReductionTargetOnScreenSizeEnabled( bool value ) const;
// Getter
bool GetBoneReductionTargetOnScreenSizeEnabled() const;
# 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
# 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
// Setter
void SetBoneReductionTargetStopCondition( Simplygon::EStopCondition value ) const;
// Getter
Simplygon::EStopCondition GetBoneReductionTargetStopCondition() const;
# 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. |
# 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.
# Syntax
// Setter
void SetLockBoneSelectionSetName( const char * value ) const;
// Getter
spString GetLockBoneSelectionSetName() const;
# SetLockBoneSelectionSetName parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
const char * | value | The name of the selection set. |
# GetLockBoneSelectionSetName return value
Type: spString
Default: nullptr
# 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
// Setter
void SetMaxBonePerVertex( unsigned int value ) const;
// Getter
unsigned int GetMaxBonePerVertex() const;
# SetMaxBonePerVertex parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
unsigned int | value | 0 | SG_NUM_SUPPORTED_BONES_PER_VERTEX | The desired maximum bones per vertex. |
# GetMaxBonePerVertex return value
Type: unsigned int
Default: SG_NUM_SUPPORTED_BONES_PER_VERTEX
# Name
The name of the BoneSettings object. (Inherited from Object)
# 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
// Setter
void SetRemoveBoneSelectionSetID( rid value ) const;
// Getter
rid GetRemoveBoneSelectionSetID() const;
# SetRemoveBoneSelectionSetID parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
rid | value | -1 | The ID of the selection set. |
# GetRemoveBoneSelectionSetID return value
Type: rid
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
// Setter
void SetRemoveBoneSelectionSetName( const char * value ) const;
// Getter
spString GetRemoveBoneSelectionSetName() const;
# SetRemoveBoneSelectionSetName parameters
Type | Name | Min | Max | Description |
---|---|---|---|---|
const char * | value | The name of the selection set. |
# GetRemoveBoneSelectionSetName return value
Type: spString
Default: nullptr
# 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 details
# AddObserver
Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
# GetBoolParameter
Get a named parameter boolean value.
# GetClass
Get the name of the BoneSettings class. (Inherited from Object)
# GetDoubleParameter
Get a named parameter floating point value.
# GetErrorString
Returns a string describing the error that was found the last time ValidateSettings was performed.
# GetIntParameter
Get a named parameter integer value.
# GetStringParameter
Get a named parameter string value.
# GetUIntParameter
Get a named parameter unsigned integer value.
# IsA
Returns true if BoneSettings is a or is a descendant of the class named as the type parameter. (Inherited from Object)
# IsNull
Returns true if the BoneSettings object is invalid. (Inherited from Object)
# IsSameObjectAs
Returns true if the BoneSettings object is valid. (Inherited from Object)
# NonNull
Returns true if the BoneSettings object is valid. (Inherited from Object)
# PrintInfo
Prints the content/info of the BoneSettings object to the log. (Inherited from Object)
# RemoveObserver
Removes a previously added observer object. (Inherited from Object)
# SetBoneReductionTargets
Set bone reduction targets and stop condition used in the bone reduction.
# Syntax
void SetBoneReductionTargets( Simplygon::EStopCondition stopCondition , bool useBoneRatio , bool useBoneCount , bool useMaxDeviation , bool useOnScreenSize ) const;
# 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. |
# SetBoolParameter
Set a named parameter boolean value.
# SetDoubleParameter
Set a named parameter floating point value.
# SetIntParameter
Set a named parameter integer value.
# SetStringParameter
Set a named parameter string value.
# SetUIntParameter
Set a named parameter unsigned integer value.
# SetValidateParameterNames
Set if parameter names should be validated or not. Parameters that previously do not exist will generate and error if validation is enabled and be allowed if validation is disabled.
# ToJSON
Get settings as JSON for debugging purposes.
# ValidateSettings
Validates the current settings values.
# Static methods details
# IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
# 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. (Inherited from Object)