IMeshUtilities::CalculateTriangleTangent

Calculate The tangent, bi normal and normal for the triangle define by the tree SoftSkinVertex.

Unreal Engine C++ API Reference > Developer > MeshUtilities > IMeshUtilities

References

   
Module MeshUtilities
Header /Engine/Source/Developer/MeshUtilities/Public/MeshUtilities.h
Include #include "MeshUtilities.h"
void CalculateTriangleTangent
(
    const [FSoftSkinVertex](API\Runtime\Engine\Rendering\FSoftSkinVertex) & VertexA,
    const [FSoftSkinVertex](API\Runtime\Engine\Rendering\FSoftSkinVertex) & VertexB,
    const [FSoftSkinVertex](API\Runtime\Engine\Rendering\FSoftSkinVertex) & VertexC,
    [TArray](API\Runtime\Core\Containers\TArray)< FVector3f > & OutTangents,
    float CompareThreshold
)

Remarks

Calculate The tangent, bi normal and normal for the triangle define by the tree SoftSkinVertex.

The function will always fill properly the OutTangents array with 3 FVector. If the triangle is degenerated the OutTangent will contain zeroed vectors.

Parameters

Name Description
VertexA First triangle vertex.
VertexB Second triangle vertex.
VertexC Third triangle vertex.
OutTangents The function allocate the TArray with 3 FVector, to represent the triangle tangent, bi normal and normal.
CompareThreshold The threshold use to compare a tangent vector with zero.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library