Navigation
API > API/Runtime > API/Runtime/MeshConversion
References
| Module | MeshConversion |
| Header | /Engine/Source/Runtime/MeshConversion/Public/ToDynamicMesh.h |
| Include | #include "ToDynamicMesh.h" |
namespace UE
{
&42;bool UE&58;&58;GetUVTri
&40;
int32 LayerID,
const TriIDType & TID,
UVIDType & ID0,
UVIDType & ID1,
UVIDType & ID2
&41; const
}
Remarks
Class used to convert a mesh with attributes (e.g. normals, uvs etc) to a FDynamicMesh3
The Source Mesh has to implement this interface
struct FSrcMeshInterface { // ID types: must be castable to int32 typedef SrcVertIDType VertIDType; typedef SrcTriIDType TriIDType; typedef SrcUVIDType UVIDType; typedef SrcNormalIDType NormalIDType; typedef SrcColorIDType ColorIDType typedef SrcWedgeIDType WedgeIDType;
// accounting. int32 NumTris() const; int32 NumVerts() const; int32 NumUVLayers() const;
// "Vertex Buffer" info const Iterable_VertIDType& GetVertIDs() const; const FVector3d GetPosition(const VertIDType VtxID) const;
// "Index Buffer" info const Iterable_TriIDType& GetTriIDs() const // return false if this TriID is not contained in mesh. bool GetTri(const TriIDType TriID, VertIDType& VID0, VertIDType& VID1, VertIDType& VID2) const;
bool HasNormals() const; bool HasTangents() cosnt; bool HasBiTangents() const;
// Each triangle corner is a wedge void GetWedgeID(const TriIDType& TriID, WedgeIDType& WID0, WedgeIDType& WID1, WedgeIDType& WID2) const;
// attribute access per-wedge // NB: ToDynamicMesh will attempt to weld identical attributes that are associated with the same vertex FVector2f GetWedgeUV(int32 UVLayerIndex, WedgeIDType WID) const; FVector3f GetWedgeNormal(WedgeIDType WID) const; FVector3f GetWedgeTangent(WedgeIDType WID) const; FVector3f GetWedgeBiTangent(WedgeIDType WID) const; FVector4f GetWedgeColor(WedgeIDType WID) const;
// attribute access that exploits shared attributes. // each group of shared attributes presents itself as a mesh with its own attribute vertex buffer. // NB: If the mesh has no shared Attr attributes, then Get{Attr}IDs() should return an empty array. // NB: Get{Attr}Tri() functions should return false if the triangle is not set in the attribute mesh.
const TArray