UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FDatasmithMesh Class Reference

#include <DatasmithMesh.h>

Classes

class  FDatasmithMeshImpl
 

Public Member Functions

UE_API FDatasmithMesh ()
 
UE_API ~FDatasmithMesh ()
 
UE_API FDatasmithMesh (const FDatasmithMesh &Other)
 
UE_API FDatasmithMesh (FDatasmithMesh &&Other)
 
UE_API FDatasmithMeshoperator= (const FDatasmithMesh &Other)
 
UE_API FDatasmithMeshoperator= (FDatasmithMesh &&Other)
 
UE_API FMD5Hash CalculateHash () const
 
UE_API void SetName (const TCHAR *InName)
 
UE_API const TCHARGetName () const
 
UE_API void SetFacesCount (int32 NumFaces)
 
UE_API int32 GetFacesCount () const
 
UE_API void SetFace (int32 Index, int32 Vertex1, int32 Vertex2, int32 Vertex3, int32 MaterialId=0)
 
UE_API void GetFace (int32 Index, int32 &Vertex1, int32 &Vertex2, int32 &Vertex3, int32 &MaterialId) const
 
UE_API void SetFaceSmoothingMask (int32 Index, uint32 SmoothingMask)
 
UE_API uint32 GetFaceSmoothingMask (int32 Index) const
 
UE_API int32 GetMaterialsCount () const
 
UE_API bool IsMaterialIdUsed (int32 MaterialId) const
 
UE_API void SetVerticesCount (int32 NumVerts)
 
UE_API int32 GetVerticesCount () const
 
UE_API void SetVertex (int32 Index, float X, float Y, float Z)
 
UE_API FVector3f GetVertex (int32 Index) const
 
UE_API void SetNormal (int32 Index, float X, float Y, float Z)
 
UE_API FVector3f GetNormal (int32 Index) const
 
UE_API void SetUVChannelsCount (int32 ChannelCount)
 
UE_API void AddUVChannel ()
 
UE_API void RemoveUVChannel ()
 
UE_API int32 GetUVChannelsCount () const
 
UE_API void SetUVCount (int32 Channel, int32 NumVerts)
 
UE_API int32 GetUVCount (int32 Channel) const
 
UE_API void SetUV (int32 Channel, int32 Index, double U, double V)
 
UE_API uint32 GetHashForUVChannel (int32 Channel) const
 
UE_API FVector2D GetUV (int32 Channel, int32 Index) const
 
UE_API void SetFaceUV (int32 Index, int32 Channel, int32 Vertex1, int32 Vertex2, int32 Vertex3)
 
UE_API void GetFaceUV (int32 Index, int32 Channel, int32 &Vertex1, int32 &Vertex2, int32 &Vertex3) const
 
UE_API int32 GetVertexColorCount () const
 
UE_API void SetVertexColor (int32 Index, const FColor &Color)
 
UE_API FColor GetVertexColor (int32 Index) const
 
UE_API void SetLightmapSourceUVChannel (int32 Channel)
 
UE_API int32 GetLightmapSourceUVChannel () const
 
UE_API void AddLOD (const FDatasmithMesh &InLODMesh)
 
UE_API void AddLOD (FDatasmithMesh &&InLODMesh)
 
UE_API int32 GetLODsCount () const
 
UE_API FDatasmithMeshGetLOD (int32 Index)
 
UE_API const FDatasmithMeshGetLOD (int32 Index) const
 
UE_API float ComputeArea () const
 
UE_API FBox3f GetExtents () const
 

Constructor & Destructor Documentation

◆ FDatasmithMesh() [1/3]

FDatasmithMesh::FDatasmithMesh ( )

◆ ~FDatasmithMesh()

FDatasmithMesh::~FDatasmithMesh ( )

◆ FDatasmithMesh() [2/3]

FDatasmithMesh::FDatasmithMesh ( const FDatasmithMesh Other)

◆ FDatasmithMesh() [3/3]

FDatasmithMesh::FDatasmithMesh ( FDatasmithMesh &&  Other)

Member Function Documentation

◆ AddLOD() [1/2]

void FDatasmithMesh::AddLOD ( const FDatasmithMesh InLODMesh)

Adds a LOD mesh to this base LOD mesh

◆ AddLOD() [2/2]

void FDatasmithMesh::AddLOD ( FDatasmithMesh &&  InLODMesh)

◆ AddUVChannel()

void FDatasmithMesh::AddUVChannel ( )

Add a UV channel at the end

◆ CalculateHash()

FMD5Hash FDatasmithMesh::CalculateHash ( ) const

◆ ComputeArea()

float FDatasmithMesh::ComputeArea ( ) const

Returns the total surface area

◆ GetExtents()

FBox3f FDatasmithMesh::GetExtents ( ) const

Returns the bounding box containing all vertices of this mesh

◆ GetFace()

void FDatasmithMesh::GetFace ( int32  Index,
int32 Vertex1,
int32 Vertex2,
int32 Vertex3,
int32 MaterialId 
) const

◆ GetFacesCount()

int32 FDatasmithMesh::GetFacesCount ( ) const

Retrieves the amount of faces

◆ GetFaceSmoothingMask()

uint32 FDatasmithMesh::GetFaceSmoothingMask ( int32  Index) const

Gets the smoothing mask of a face

Parameters
IndexIndex of the face to retrieve the smoothing mask from

◆ GetFaceUV()

void FDatasmithMesh::GetFaceUV ( int32  Index,
int32  Channel,
int32 Vertex1,
int32 Vertex2,
int32 Vertex3 
) const

Gets the UV coordinates of the vertices of a face

Parameters
IndexIndex of the face to retrieve the UVs from
ChannelUV channel, starting at 0
Vertex1Index of the first uv vertex that defines this face
Vertex2Index of the second uv vertex that defines this face
Vertex3Index of the third uv vertex that defines this face

◆ GetHashForUVChannel()

uint32 FDatasmithMesh::GetHashForUVChannel ( int32  Channel) const

Get the hash for a uv channel

◆ GetLightmapSourceUVChannel()

int32 FDatasmithMesh::GetLightmapSourceUVChannel ( ) const

Gets the UV channel that will be used for lightmap UVs generation at import

◆ GetLOD() [1/2]

FDatasmithMesh * FDatasmithMesh::GetLOD ( int32  Index)

Gets the FDatasmithMesh LOD at the given index, if the index is invalid returns nullptr

◆ GetLOD() [2/2]

const FDatasmithMesh * FDatasmithMesh::GetLOD ( int32  Index) const

◆ GetLODsCount()

int32 FDatasmithMesh::GetLODsCount ( ) const

◆ GetMaterialsCount()

int32 FDatasmithMesh::GetMaterialsCount ( ) const

◆ GetName()

const TCHAR * FDatasmithMesh::GetName ( ) const

◆ GetNormal()

FVector3f FDatasmithMesh::GetNormal ( int32  Index) const

◆ GetUV()

FVector2D FDatasmithMesh::GetUV ( int32  Channel,
int32  Index 
) const

Gets the UV coordinates for a channel

Parameters
ChannelThe channel we want to retrieve the UVs from
IndexThe UV coordinates to retrieve

◆ GetUVChannelsCount()

int32 FDatasmithMesh::GetUVChannelsCount ( ) const

Gets the amount of UV channels on this mesh

◆ GetUVCount()

int32 FDatasmithMesh::GetUVCount ( int32  Channel) const

Retrieves the amount of UV coordinates on the channel. The validity of the vertex data is not guaranteed

◆ GetVertex()

FVector3f FDatasmithMesh::GetVertex ( int32  Index) const

◆ GetVertexColor()

FColor FDatasmithMesh::GetVertexColor ( int32  Index) const

Get the color for a vertex

Parameters
IndexIndex of the vertex color to retrieve

◆ GetVertexColorCount()

int32 FDatasmithMesh::GetVertexColorCount ( ) const

Get the number of vertex color

◆ GetVerticesCount()

int32 FDatasmithMesh::GetVerticesCount ( ) const

Retrieves the amount of geometric vertices. The validity of the vertex data is not guaranteed

◆ IsMaterialIdUsed()

bool FDatasmithMesh::IsMaterialIdUsed ( int32  MaterialId) const

◆ operator=() [1/2]

FDatasmithMesh & FDatasmithMesh::operator= ( const FDatasmithMesh Other)

◆ operator=() [2/2]

FDatasmithMesh & FDatasmithMesh::operator= ( FDatasmithMesh &&  Other)

◆ RemoveUVChannel()

void FDatasmithMesh::RemoveUVChannel ( )

Remove the last UV channel

◆ SetFace()

void FDatasmithMesh::SetFace ( int32  Index,
int32  Vertex1,
int32  Vertex2,
int32  Vertex3,
int32  MaterialId = 0 
)

Sets the geometry of the face

Parameters
Indexvalue to choose the face that will be affected
Vertex1Index of the first geometric vertex that defines this face
Vertex2Index of the second geometric vertex that defines this face
Vertex3Index of the third geometric vertex that defines this face

◆ SetFacesCount()

void FDatasmithMesh::SetFacesCount ( int32  NumFaces)

Setting the amount of faces is mandatory before filling the array

◆ SetFaceSmoothingMask()

void FDatasmithMesh::SetFaceSmoothingMask ( int32  Index,
uint32  SmoothingMask 
)

Sets the smoothing mask of the face

Parameters
IndexIndex of the face that will be affected
SmoothingMask32 bits mask, 0 means no smoothing

◆ SetFaceUV()

void FDatasmithMesh::SetFaceUV ( int32  Index,
int32  Channel,
int32  Vertex1,
int32  Vertex2,
int32  Vertex3 
)

Sets the channel UV coordinates of the face

Parameters
IndexIndex of the face that will be affected
ChannelUV channel, starting at 0
Vertex1Index of the first uv vertex that defines this face
Vertex2Index of the second uv vertex that defines this face
Vertex3Index of the third uv vertex that defines this face

◆ SetLightmapSourceUVChannel()

void FDatasmithMesh::SetLightmapSourceUVChannel ( int32  Channel)

Sets the UV channel that will be used as the source UVs for lightmap UVs generation at import, defaults to channel 0. Will be overwritten during Mesh export if we choose to generate the lightmap source UVs.

◆ SetName()

void FDatasmithMesh::SetName ( const TCHAR InName)

◆ SetNormal()

void FDatasmithMesh::SetNormal ( int32  Index,
float  X,
float  Y,
float  Z 
)

Sets the 3d normal

Parameters
Indexvalue to choose the normal that will be affected @x direction on the x axis @y direction on the y axis @z direction on the z axis

◆ SetUV()

void FDatasmithMesh::SetUV ( int32  Channel,
int32  Index,
double  U,
double  V 
)

Sets the 2d position of the UV vertex for the first uv mapping

Parameters
IndexValue to choose the vertex that will be affected
UHorizontal coordinate
VVertical coordinate

◆ SetUVChannelsCount()

void FDatasmithMesh::SetUVChannelsCount ( int32  ChannelCount)

Sets the amount of UV channels on this mesh

Parameters
ChannelCountThe number of UV channels

◆ SetUVCount()

void FDatasmithMesh::SetUVCount ( int32  Channel,
int32  NumVerts 
)

Setting the amount of UV coordinates on the channel is mandatory before filling the array

Parameters
ChannelThe channel to set the numbers of UVs
NumVertsThe number of UVs in the channel

◆ SetVertex()

void FDatasmithMesh::SetVertex ( int32  Index,
float  X,
float  Y,
float  Z 
)

Sets the 3d position of the vertex

Parameters
Indexvalue to choose the vertex that will be affected @x position on the x axis @y position on the y axis @z position on the z axis

◆ SetVertexColor()

void FDatasmithMesh::SetVertexColor ( int32  Index,
const FColor Color 
)

Set a vertex color

Parameters
IndexIndex of the vertex color that will be affected
ColorThe color for the vertex

◆ SetVerticesCount()

void FDatasmithMesh::SetVerticesCount ( int32  NumVerts)

Setting the amount of geometric vertices is mandatory before filling the array


The documentation for this class was generated from the following files: