TMeshTangents

Predeclare tangents template

Windows
MacOS
Linux

References

Module

DynamicMesh

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/DynamicMesh/Public/MeshTangents.h

Include

#include "MeshTangents.h"

Syntax

template<typename RealType>
class TMeshTangents

Remarks

TMeshTangents is a utility class that can calculate and store various types of tangent vectors for a FDynamicMesh.

Variables

Name Description

Protected variable

TArray< int32 >

 

AllDegenerateTris

Indices of degenerate triangles.

Protected variable

TArray< FVector...

 

Bitangents

Set of computed bitangents

Protected variable

const FDynamicM...

 

Mesh

Target Mesh

Protected variable

TArray< FVector...

 

Tangents

Set of computed tangents

Constructors

Name Description

Public function

TMeshTangents()

Public function

TMeshTangents

(
    const FDynamicMesh3* Mesh
)

Functions

Name Description

Protected function

void

 

ComputeMikkTStyleTangents

(
    const FDynamicMeshNormalOverlay...,
    const FDynamicMeshUVOverlay* U...,
    const FComputeTangentsOptions& Opt...
)

Calculate MikkT-space-style tangents.

Protected function

void

 

ComputeSeparatePerTriangleTangents

(
    const FDynamicMeshNormalOverlay...,
    const FDynamicMeshUVOverlay* U...,
    const FComputeTangentsOptions& Opt...
)

Calculate per-triangle tangents and then projected to overlay normals at each triangle-vertex

Public function

void

 

ComputeTriangleTangents

(
    const FDynamicMeshUVOverlay* U...,
    bool bOrthogonalize
)

Compute per-triangle tangents for the given UV Overlay

Public function

void

 

ComputeTriVertexTangents

(
    const FDynamicMeshNormalOverlay...,
    const FDynamicMeshUVOverlay* U...,
    const FComputeTangentsOptions& Opt...
)

Calculate per-triangle tangent spaces based on the given per-triangle normal and UV overlays.

Public function

bool

 

CopyToOverlays

(
    FDynamicMesh3& MeshToSet
)

Set Tangents on mesh overlays

Public function

void

 

CopyTriVertexTangents

(
    const TMeshTangents< OtherRealType ...
)

Initialize Tangents from other Tangents set

Public function Const

const TArray...

 

GetBitangents()

Public function Const

const TArray...

 

GetDegenerateTris()

Public function Const

void

 

GetInterpolatedTriangleTangent

(
    int32 TriangleID,
    const FVector3< RealType >& BaryCo...,
    FVector3< RealType >& TangentOut,
    FVector3< RealType >& BitangentOut
)

Public function Const

void

 

GetPerTriangleTangent

(
    int32 TriangleID,
    int32 TriVertIdx,
    VectorType& TangentOut,
    VectorType& BitangentOut
)

Return tangent and bitangent at a vertex of triangle for per-triangle computed tangents

Public function Const

void

 

GetPerTriangleTangent

(
    int32 TriangleID,
    int32 TriVertIdx,
    FVector3< RealType >& TangentOut,
    FVector3< RealType >& BitangentOut
)

Return tangent and bitangent at a vertex of triangle for per-triangle computed tangents

Public function Const

const TArray...

 

GetTangents()

Public function

void

 

InitializeTriangleTangents

(
    bool bClearToZero
)

Per-Triangle Tangents Number of Tangents is NumTrianglesInitialize buffer sizes to one tangent/bitangent per mesh triangle

Public function

void

 

InitializeTriVertexTangents

(
    bool bClearToZero
)

Per-Triangle-Vertex Tangents Number of Tangents is NumTriangles * 3 Set internal buffer sizes suitable for calculating per-triangle tangents.

Public function

void

 

SetMesh

(
    const FDynamicMesh3* MeshIn
)

Public function

void

 

SetPerTriangleTangent

(
    int TriangleID,
    int TriVertIdx,
    const FVector3< RealType >& Tangen...,
    const FVector3< RealType >& Bitang...
)

Set tangent and bitangent at a vertex of triangle for per-triangle computed tangents.

Protected function

void

 

SetTangentCount

(
    int Count,
    bool bClearToZero
)

Set the size of the Tangents array to Count, and optionally clear all values to (0,0,0)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss