class
NormalCalculationSettings
Settings for the normal recalculation
Properties
Property | Description |
HardEdgeAngle | Set HardEdgeAngle in degrees. If the angle between two triangles are above this value, the normals will not be smooth over the edge between those two triangles. |
ReorthogonalizeTangentSpace | If set, the tangentspaces already existing in the scene will be readjusted so that the tangent and binormal are both orthogonal to the normal. Will be needed since most of the time the normals are changed in the reduction process. |
RepairInvalidNormals | If set, normals that are invalid will be replaced. All others are left intact. Bad normals are those that are either zero length, or simply points away from the surface. |
ReplaceNormals | If set, it will generate new normals for the Geometry, and if not set, it will keep the normals from the original normal set (or not add normals at all if none were present). Please note that if the original geometry contains normals, the normal repairer will replace invalid normals even if ReplaceNormals is set to false. |
ReplaceTangents | If set, it will generate new tangents and bitangents for the Geometry, and if not set, it will keep the new tangents and bitangents from the original normal set (or not add tangents and bitangents at all if none were present). |
ScaleByAngle | If set, the influence of a triangle normal upon the vertex normals is scaled by the angle of the corner at the vertex. |
ScaleByArea | If set, the influence of a triangle normal upon the vertex normals is scaled by the area of the triangle. |
SnapNormalsToFlatSurfaces | If set, perfectly flat shaded surfaces will be created, where possible. Normals adjacent to perfectly geometrically flat surfaces will be recalculated to have the same direction as for those of the adjacent flat surface. |
Methods
Method | Description |
GetClass | Get the name of the NormalCalculationSettings class. |
GetErrorString | Returns a string describing the error that was found the last time ValidateSettings was performed. |
IsA | Returns true if NormalCalculationSettings is a or is a descendant of the class named as the type parameter. |
IsNull | Returns true if the NormalCalculationSettings object is invalid. |
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 spNormalCalculationSettings, and if this is the case, returns the object cast into spNormalCalculationSettings. |
Properties details
HardEdgeAngle
Set HardEdgeAngle in degrees. If the angle between two triangles are above this value, the normals will not be smooth over the edge between those two triangles.
Syntax
SetHardEdgeAngle parameters
Type | Name | Min | Max | Description |
real | value | 0 | 180 | The value to which HardEdgeAngle is to be set. |
GetHardEdgeAngle return value
Type: real
Default: 75
Syntax
SetHardEdgeAngle parameters
Type | Name | Min | Max | Description |
float | value | 0 | 180 | The value to which HardEdgeAngle is to be set. |
GetHardEdgeAngle return value
Type: float
Default: 75
Syntax
SetHardEdgeAngle parameters
Name | Type | Min | Max | Description |
value | float | 0 | 180 | The value to which HardEdgeAngle is to be set. |
GetHardEdgeAngle return value
Type: float
Default: 75
ReorthogonalizeTangentSpace
If set, the tangentspaces already existing in the scene will be readjusted so that the tangent and binormal are both orthogonal to the normal. Will be needed since most of the time the normals are changed in the reduction process.
Syntax
SetReorthogonalizeTangentSpace parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired flag value to reorthogonalize tangent space. |
GetReorthogonalizeTangentSpace return value
Type: bool
Default: true
Syntax
SetReorthogonalizeTangentSpace parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired flag value to reorthogonalize tangent space. |
GetReorthogonalizeTangentSpace return value
Type: bool
Default: true
Syntax
SetReorthogonalizeTangentSpace parameters
Name | Type | Min | Max | Description |
value | bool | | | The desired flag value to reorthogonalize tangent space. |
GetReorthogonalizeTangentSpace return value
Type: bool
Default: true
RepairInvalidNormals
If set, normals that are invalid will be replaced. All others are left intact. Bad normals are those that are either zero length, or simply points away from the surface.
Syntax
SetRepairInvalidNormals parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which RepairInvalidNormals is to be set. |
GetRepairInvalidNormals return value
Type: bool
Default: false
Syntax
SetRepairInvalidNormals parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which RepairInvalidNormals is to be set. |
GetRepairInvalidNormals return value
Type: bool
Default: false
Syntax
SetRepairInvalidNormals parameters
Name | Type | Min | Max | Description |
value | bool | | | The value to which RepairInvalidNormals is to be set. |
GetRepairInvalidNormals return value
Type: bool
Default: false
ReplaceNormals
If set, it will generate new normals for the Geometry, and if not set, it will keep the normals from the original normal set (or not add normals at all if none were present). Please note that if the original geometry contains normals, the normal repairer will replace invalid normals even if ReplaceNormals is set to false.
Syntax
SetReplaceNormals parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ReplaceNormals bool is to be set. |
GetReplaceNormals return value
Type: bool
Default: false
Syntax
SetReplaceNormals parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ReplaceNormals bool is to be set. |
GetReplaceNormals return value
Type: bool
Default: false
Syntax
SetReplaceNormals parameters
Name | Type | Min | Max | Description |
value | bool | | | The value to which the ReplaceNormals bool is to be set. |
GetReplaceNormals return value
Type: bool
Default: false
ReplaceTangents
If set, it will generate new tangents and bitangents for the Geometry, and if not set, it will keep the new tangents and bitangents from the original normal set (or not add tangents and bitangents at all if none were present).
Syntax
SetReplaceTangents parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ReplaceTangents bool is to be set. |
GetReplaceTangents return value
Type: bool
Default: false
Syntax
SetReplaceTangents parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ReplaceTangents bool is to be set. |
GetReplaceTangents return value
Type: bool
Default: false
Syntax
SetReplaceTangents parameters
Name | Type | Min | Max | Description |
value | bool | | | The value to which the ReplaceTangents bool is to be set. |
GetReplaceTangents return value
Type: bool
Default: false
ScaleByAngle
If set, the influence of a triangle normal upon the vertex normals is scaled by the angle of the corner at the vertex.
Syntax
SetScaleByAngle parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ScaleByAngle bool is to be set. |
GetScaleByAngle return value
Type: bool
Default: true
Syntax
SetScaleByAngle parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ScaleByAngle bool is to be set. |
GetScaleByAngle return value
Type: bool
Default: true
Syntax
SetScaleByAngle parameters
Name | Type | Min | Max | Description |
value | bool | | | The value to which the ScaleByAngle bool is to be set. |
GetScaleByAngle return value
Type: bool
Default: true
ScaleByArea
If set, the influence of a triangle normal upon the vertex normals is scaled by the area of the triangle.
Syntax
SetScaleByArea parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ScaleByArea bool is to be set. |
GetScaleByArea return value
Type: bool
Default: true
Syntax
SetScaleByArea parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ScaleByArea bool is to be set. |
GetScaleByArea return value
Type: bool
Default: true
Syntax
SetScaleByArea parameters
Name | Type | Min | Max | Description |
value | bool | | | The value to which the ScaleByArea bool is to be set. |
GetScaleByArea return value
Type: bool
Default: true
SnapNormalsToFlatSurfaces
If set, perfectly flat shaded surfaces will be created, where possible. Normals adjacent to perfectly geometrically flat surfaces will be recalculated to have the same direction as for those of the adjacent flat surface.
Syntax
SetSnapNormalsToFlatSurfaces parameters
Type | Name | Min | Max | Description |
bool | value | | | To use for SnapNormalsToFlatSurfaces. |
GetSnapNormalsToFlatSurfaces return value
Type: bool
Default: false
Syntax
SetSnapNormalsToFlatSurfaces parameters
Type | Name | Min | Max | Description |
bool | value | | | To use for SnapNormalsToFlatSurfaces. |
GetSnapNormalsToFlatSurfaces return value
Type: bool
Default: false
Syntax
SetSnapNormalsToFlatSurfaces parameters
Name | Type | Min | Max | Description |
value | bool | | | To use for SnapNormalsToFlatSurfaces. |
GetSnapNormalsToFlatSurfaces return value
Type: bool
Default: false
Methods details
GetClass
Get the name of the NormalCalculationSettings 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 NormalCalculationSettings 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 NormalCalculationSettings 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 NormalCalculationSettings 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 NormalCalculationSettings is, or is a descendant of. |
Return value
Type: bool
IsNull
Returns true if the NormalCalculationSettings 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
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 spNormalCalculationSettings, and if this is the case, returns the object cast into spNormalCalculationSettings.