UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMeshDescriptionTriangleMeshAdapter Struct Reference

#include <MeshDescriptionAdapter.h>

Public Types

using FIndex3i = UE::Geometry::FIndex3i
 

Public Member Functions

 FMeshDescriptionTriangleMeshAdapter (const FMeshDescription *MeshIn)
 
void SetBuildScale (const FVector3d &BuildScaleIn, bool bScaleNormalsIn)
 
bool IsTriangle (int32 TID) const
 
bool IsVertex (int32 VID) const
 
int32 MaxTriangleID () const
 
int32 TriangleCount () const
 
int32 MaxVertexID () const
 
int32 VertexCount () const
 
uint64 GetChangeStamp () const
 
FIndex3i GetTriangle (int32 IDValue) const
 
FVector3d GetVertex (int32 IDValue) const
 
void GetTriVertices (int32 IDValue, FVector3d &V0, FVector3d &V1, FVector3d &V2) const
 
template<typename VectorType >
void GetTriVertices (int32 IDValue, VectorType &V0, VectorType &V1, VectorType &V2) const
 
bool HasNormals () const
 
bool IsNormal (int32 NID) const
 
int32 MaxNormalID () const
 
int32 NormalCount () const
 
FVector3f GetNormal (int32 IDValue) const
 
template<typename VectorType >
void GetTriNormals (int32 TriId, VectorType &N0, VectorType &N1, VectorType &N2)
 
bool HasUVs (const int32 UVLayer=0) const
 
bool IsUV (const int32 UVId) const
 
int32 MaxUVID () const
 
int32 UVCount () const
 
FVector2f GetUV (const int32 IDValue, const int32 UVLayer) const
 
template<typename VectorType >
void GetTriUVs (const int32 TriId, const int32 UVLayer, VectorType &UV0, VectorType &UV1, VectorType &UV2)
 

Protected Attributes

const FMeshDescriptionMesh
 
TVertexAttributesConstRef< FVector3fVertexPositions
 
TVertexInstanceAttributesConstRef< FVector3fVertexInstanceNormals
 
TVertexInstanceAttributesConstRef< FVector2fVertexInstanceUVs
 
TArrayView< const FVertexInstanceIDTriangleVertexInstanceIndices
 
FVector3d BuildScale = FVector3d::One()
 
bool bScaleNormals = false
 

Detailed Description

Basic struct to adapt a FMeshDescription for use by GeometryProcessing classes that template the mesh type and expect a standard set of basic accessors For example, this adapter will let you use a FMeshDescription with GeometryProcessing's TMeshAABBTree3 See also the Editable version below

Usage example – given some const FMeshDescription* Mesh: FMeshDescriptionAABBAdapter MeshAdapter(Mesh); // adapt the mesh TMeshAABBTree3<const FMeshDescriptionTriangleMeshAdapter> AABBTree(&MeshAdapter); // provide the adapter to a templated class like TMeshAABBTree3

Member Typedef Documentation

◆ FIndex3i

Constructor & Destructor Documentation

◆ FMeshDescriptionTriangleMeshAdapter()

FMeshDescriptionTriangleMeshAdapter::FMeshDescriptionTriangleMeshAdapter ( const FMeshDescription MeshIn)
inline

Member Function Documentation

◆ GetChangeStamp()

uint64 FMeshDescriptionTriangleMeshAdapter::GetChangeStamp ( ) const
inline

◆ GetNormal()

FVector3f FMeshDescriptionTriangleMeshAdapter::GetNormal ( int32  IDValue) const
inline

Get Normal by VertexInstanceID

◆ GetTriangle()

FIndex3i FMeshDescriptionTriangleMeshAdapter::GetTriangle ( int32  IDValue) const
inline

◆ GetTriNormals()

template<typename VectorType >
void FMeshDescriptionTriangleMeshAdapter::GetTriNormals ( int32  TriId,
VectorType &  N0,
VectorType &  N1,
VectorType &  N2 
)
inline

Get Normals for a given Triangle

◆ GetTriUVs()

template<typename VectorType >
void FMeshDescriptionTriangleMeshAdapter::GetTriUVs ( const int32  TriId,
const int32  UVLayer,
VectorType &  UV0,
VectorType &  UV1,
VectorType &  UV2 
)
inline

Get UVs for a given UVLayer and Triangle

◆ GetTriVertices() [1/2]

void FMeshDescriptionTriangleMeshAdapter::GetTriVertices ( int32  IDValue,
FVector3d V0,
FVector3d V1,
FVector3d V2 
) const
inline

◆ GetTriVertices() [2/2]

template<typename VectorType >
void FMeshDescriptionTriangleMeshAdapter::GetTriVertices ( int32  IDValue,
VectorType &  V0,
VectorType &  V1,
VectorType &  V2 
) const
inline

◆ GetUV()

FVector2f FMeshDescriptionTriangleMeshAdapter::GetUV ( const int32  IDValue,
const int32  UVLayer 
) const
inline

Get UV by VertexInstanceID for a given UVLayer

◆ GetVertex()

FVector3d FMeshDescriptionTriangleMeshAdapter::GetVertex ( int32  IDValue) const
inline

◆ HasNormals()

bool FMeshDescriptionTriangleMeshAdapter::HasNormals ( ) const
inline

◆ HasUVs()

bool FMeshDescriptionTriangleMeshAdapter::HasUVs ( const int32  UVLayer = 0) const
inline

◆ IsNormal()

bool FMeshDescriptionTriangleMeshAdapter::IsNormal ( int32  NID) const
inline

◆ IsTriangle()

bool FMeshDescriptionTriangleMeshAdapter::IsTriangle ( int32  TID) const
inline

◆ IsUV()

bool FMeshDescriptionTriangleMeshAdapter::IsUV ( const int32  UVId) const
inline

◆ IsVertex()

bool FMeshDescriptionTriangleMeshAdapter::IsVertex ( int32  VID) const
inline

◆ MaxNormalID()

int32 FMeshDescriptionTriangleMeshAdapter::MaxNormalID ( ) const
inline

◆ MaxTriangleID()

int32 FMeshDescriptionTriangleMeshAdapter::MaxTriangleID ( ) const
inline

◆ MaxUVID()

int32 FMeshDescriptionTriangleMeshAdapter::MaxUVID ( ) const
inline

◆ MaxVertexID()

int32 FMeshDescriptionTriangleMeshAdapter::MaxVertexID ( ) const
inline

◆ NormalCount()

int32 FMeshDescriptionTriangleMeshAdapter::NormalCount ( ) const
inline

◆ SetBuildScale()

void FMeshDescriptionTriangleMeshAdapter::SetBuildScale ( const FVector3d BuildScaleIn,
bool  bScaleNormalsIn 
)
inline

◆ TriangleCount()

int32 FMeshDescriptionTriangleMeshAdapter::TriangleCount ( ) const
inline

◆ UVCount()

int32 FMeshDescriptionTriangleMeshAdapter::UVCount ( ) const
inline

◆ VertexCount()

int32 FMeshDescriptionTriangleMeshAdapter::VertexCount ( ) const
inline

Member Data Documentation

◆ bScaleNormals

bool FMeshDescriptionTriangleMeshAdapter::bScaleNormals = false
protected

◆ BuildScale

FVector3d FMeshDescriptionTriangleMeshAdapter::BuildScale = FVector3d::One()
protected

◆ Mesh

const FMeshDescription* FMeshDescriptionTriangleMeshAdapter::Mesh
protected

◆ TriangleVertexInstanceIndices

TArrayView<const FVertexInstanceID> FMeshDescriptionTriangleMeshAdapter::TriangleVertexInstanceIndices
protected

◆ VertexInstanceNormals

TVertexInstanceAttributesConstRef<FVector3f> FMeshDescriptionTriangleMeshAdapter::VertexInstanceNormals
protected

◆ VertexInstanceUVs

TVertexInstanceAttributesConstRef<FVector2f> FMeshDescriptionTriangleMeshAdapter::VertexInstanceUVs
protected

◆ VertexPositions

TVertexAttributesConstRef<FVector3f> FMeshDescriptionTriangleMeshAdapter::VertexPositions
protected

The documentation for this struct was generated from the following file: