IMeshUtilities::CalculateTangents

Calculates Tangents and Normals for a given set of vertex data

Windows
MacOS
Linux

References

Module

MeshUtilities

Header

/Engine/Source/Developer/MeshUtilities/Public/MeshUtilities.h

Include

#include "MeshUtilities.h"

Syntax

void CalculateTangents
(
    const TArray< FVector > & InVertices,
    const TArray< uint32 > & InIndices,
    const TArray< FVector2D > & InUVs,
    const TArray< uint32 > & InSmoothingGroupIndices,
    const uint32 InTangentOptions,
    TArray< FVector > & OutTangentX,
    TArray< FVector > & OutTangentY,
    TArray< FVector > & OutNormals
) const

Remarks

Calculates Tangents and Normals for a given set of vertex data

Parameters

Parameter

Description

InVertices

Vertices that make up the mesh

InIndices

Indices for the Vertex array

InUVs

Texture coordinates (per-index based)

InSmoothingGroupIndices

Smoothing group index (per-face based)

InTangentOptions

Flags for Tangent calculation

OutTangentX

Array to hold calculated Tangents

OutTangentY

Array to hold calculated Bitangents

OutNormals

Array to hold calculated normals (if already contains normals will use those instead for the tangent calculation)

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