class TangentCalculator
TangentCalculator calculates tangent and bitangent vectors for geometry data objects. A corner field of texture coordinates must exist, as well as normals. For each processed texture coordinate level N, the results are placed into the corner fields "TangentsN" and "BitangentsN", replacing any existing tangent and bitangent fields at that level. The generated fields have null alternative names; the texture coordinate field's alternative name is not copied. Retrieve the results with GeometryData::GetTangents(N) and GeometryData::GetBitangents(N). If only the texture coordinate alternative name is known, resolve N with GeometryData::GetNamedTexCoordsIndex(name) and check that the result is not -1 before calculating or retrieving tangents.
Properties
| Property | Description |
|---|---|
| InvertV | Inverts the V component of the texcoords used for tangent calculation. This essentially switches between right- and lefthanded, i.e. TangentCalculatorType = OrthonormalRightHanded and InvertV = true generates equivalent tangents to TangentCalculatorType = OrthonormalLeftHanded. |
| Name | The name of the TangentCalculator object. (Inherited from Object) |
| TangentCalculatorType | Sets/Gets the tangent calculator type, types listed in TangentSpaceMethod. |
| TexCoordsSetId | The texture coordinate level to use for tangent calculation. The generated Tangents and Bitangents fields use this same level and have null alternative names. If only the texture coordinate alternative name is known, resolve its level with GeometryData::GetNamedTexCoordsIndex(name) and check that the result is not -1 before setting this property. If set to -1, all texture coordinate levels will get corresponding tangent and bitangent fields. |
Methods
| Method | Description |
|---|---|
| AddObserver | Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object) |
| CalculateTangents | Calculates the tangents of a geometry data object. |
| CalculateTangentsForNodeHierarchy | Calculates the tangents of a tree of scene nodes (only the geometry nodes of course). |
| CalculateTangentsOnScene | Calculates the tangents on all geometries in a scene. |
| GetClass | Get the name of the TangentCalculator class. (Inherited from Object) |
| IsA | Returns true if TangentCalculator is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
| IsNull | Returns true if the TangentCalculator object is invalid. (Inherited from Object) |
| IsSameObjectAs | Returns true if the TangentCalculator object is valid. (Inherited from Object) |
| NonNull | Returns true if the TangentCalculator object is valid. (Inherited from Object) |
| PrintInfo | Prints the content/info of the TangentCalculator object to the log. (Inherited from Object) |
| RemoveObserver | Removes a previously added observer object. (Inherited from Object) |
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 spTangentCalculator, and if this is the case, returns the object cast into spTangentCalculator. (Inherited from Object) |
Properties details
InvertV
Inverts the V component of the texcoords used for tangent calculation. This essentially switches between right- and lefthanded, i.e. TangentCalculatorType = OrthonormalRightHanded and InvertV = true generates equivalent tangents to TangentCalculatorType = OrthonormalLeftHanded.
Name
The name of the TangentCalculator object. (Inherited from Object)
TangentCalculatorType
Sets/Gets the tangent calculator type, types listed in TangentSpaceMethod.
TexCoordsSetId
The texture coordinate level to use for tangent calculation. The generated Tangents and Bitangents fields use this same level and have null alternative names. If only the texture coordinate alternative name is known, resolve its level with GeometryData::GetNamedTexCoordsIndex(name) and check that the result is not -1 before setting this property. If set to -1, all texture coordinate levels will get corresponding tangent and bitangent fields.
Methods details
AddObserver
Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
CalculateTangents
Calculates the tangents of a geometry data object.
CalculateTangentsForNodeHierarchy
Calculates the tangents of a tree of scene nodes (only the geometry nodes of course).
CalculateTangentsOnScene
Calculates the tangents on all geometries in a scene.
GetClass
Get the name of the TangentCalculator class. (Inherited from Object)
IsA
Returns true if TangentCalculator is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNull
Returns true if the TangentCalculator object is invalid. (Inherited from Object)
IsSameObjectAs
Returns true if the TangentCalculator object is valid. (Inherited from Object)
NonNull
Returns true if the TangentCalculator object is valid. (Inherited from Object)
PrintInfo
Prints the content/info of the TangentCalculator object to the log. (Inherited from Object)
RemoveObserver
Removes a previously added observer object. (Inherited from Object)
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 spTangentCalculator, and if this is the case, returns the object cast into spTangentCalculator. (Inherited from Object)
