Navigation
API > API/Plugins > API/Plugins/MutableRuntime
Mesh object containing any number of buffers with any number of channels. The buffers can be per-index or per-vertex. The mesh also includes layout information for every texture channel for internal usage, and it can be ignored. The meshes are always assumed to be triangle list primitives.
| Name | FMesh |
| Type | class |
| Header File | /Engine/Plugins/Mutable/Source/MutableRuntime/Public/MuR/Mesh.h |
| Include Path | #include "MuR/Mesh.h" |
Syntax
class FMesh : public mu::FResource
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FEntity → FEntityGeom → FMesh
- FHaveStates → FEntity → FEntityGeom → FMesh
- FResource → FMesh
- FMesh
Derived Classes
Structs
| Name | Remarks |
|---|---|
| FBonePose | |
| FVertexMatchMap | Make a map from the vertices in this mesh to thefirst matching vertex of the given mesh. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| TMemoryTrackedArray | TArray< Type, FDefaultMemoryTrackingAllocator< MemoryCounters::FMeshMemoryCounter > > | MuR/Mesh.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| InvalidVertexId | uint64 | MuR/Mesh.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdditionalBuffers | TArray< TPair< EMeshBufferType, FMeshBufferSet > > | Additional buffers used for temporary or custom data in different algorithms. | MuR/Mesh.h | |
| AdditionalPhysicsBodies | TArray< TSharedPtr< const FPhysicsBody > > | Additional physics bodies referenced by the mesh that don't merge. | MuR/Mesh.h | |
| BoneMap | TArray< FBoneName > | Array containing the bonemaps of all surfaces in the mesh. | MuR/Mesh.h | |
| BonePoses | TMemoryTrackedArray< FBonePose > | This is the pose used by this mesh fragment, used to update the transforms of the final skeleton taking into consideration the meshes being used. | MuR/Mesh.h | |
| Flags | EMeshFlags | This is bit - mask on the EMeshFlags enumeration, marking what static formats are compatible with this one and other properties. | MuR/Mesh.h | |
| IndexBuffers | FMeshBufferSet | MuR/Mesh.h | ||
| InternalId | uint32 | Non-persistent internal id unique for a mesh generated for a specific state and parameter values. | MuR/Mesh.h | |
| Layouts | TArray< TSharedPtr< const FLayout > > | Texture Layout blocks attached to this mesh. | MuR/Mesh.h | |
| MeshIDPrefix | uint32 | Prefix for the unique IDs related to this mesh (vertices and layout blocks). | MuR/Mesh.h | |
| PhysicsBody | TSharedPtr< const FPhysicsBody > | MuR/Mesh.h | ||
| ReferencedMorph | FString | If the mesh is a reference the referenced morph name is stored here. | MuR/Mesh.h | |
| ReferenceID | uint32 | Only valid if the right flags are set, this identifies a referenced mesh. | MuR/Mesh.h | |
| Skeleton | TSharedPtr< const FSkeleton > | This skeleton and physics body are not owned and may be used by other meshes, so it cannot be modified once the mesh has been fully created. | MuR/Mesh.h | |
| SkeletonIDs | TArray< uint32 > | Externally provided SkeletonIDs of the skeletons required by this mesh. | MuR/Mesh.h | |
| StreamedResources | TArray< uint64 > | Opaque handle to external resources. | MuR/Mesh.h | |
| Surfaces | TArray< FMeshSurface > | MuR/Mesh.h | ||
| Tags | TArray< FString > | MuR/Mesh.h | ||
| VertexBuffers | FMeshBufferSet | MuR/Mesh.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 AddAdditionalPhysicsBody
(
TSharedPtr< const FPhysicsBody > |
MuR/Mesh.h | ||
void AddLayout
(
TSharedPtr< const FLayout > |
MuR/Mesh.h | ||
void AddSkeletonID
(
int32 SkeletonID |
MuR/Mesh.h | ||
void AddStreamedResource
(
uint64 ResourceId |
MuR/Mesh.h | ||
bool AreVertexIdsExplicit() |
MuR/Mesh.h | ||
bool AreVertexIdsImplicit () |
Return true if the mesh has unique vertex IDs and they stored in an implicit way. | MuR/Mesh.h | |
void CheckIntegrity() |
Check mesh buffer data for possible inconsistencies | MuR/Mesh.h | |
TSharedPtr< FMesh > Clone
(
EMeshCopyFlags Flags |
Clone with flags allowing to not include some parts in the cloned mesh | MuR/Mesh.h | |
TSharedPtr< FMesh > Clone () |
Deep clone this mesh. | MuR/Mesh.h | |
void CopyFrom
(
const FMesh& From, |
Copy form another mesh. | MuR/Mesh.h | |
void EnsureSurfaceData() |
Create the surface data if not present. | MuR/Mesh.h | |
int32 FindBonePose
(
const FBoneName& BoneName |
MuR/Mesh.h | ||
TSharedPtr< const FPhysicsBody > GetAdditionalPhysicsBody
(
int32 I |
MuR/Mesh.h | ||
| Return an array containing the bonemaps of all surfaces in the mesh. | MuR/Mesh.h | ||
int32 GetBonePoseCount() |
MuR/Mesh.h | ||
const FBoneName & GetBonePoseId
(
int32 BoneIndex |
MuR/Mesh.h | ||
void GetBonePoseTransform
(
int32 BoneIndex, |
Return a matrix stored per bone. It is a set of 16-float values. | MuR/Mesh.h | |
EBoneUsageFlags GetBoneUsageFlags
(
int32 BoneIndex |
MuR/Mesh.h | ||
int32 GetFaceCount() |
MuR/Mesh.h | ||
UE::Math::TIntVector3< uint32 > GetFaceVertexIndices
(
int32 FaceIndex |
Compare the vertex attributes to check if they match. | MuR/Mesh.h | |
uint32 GetId() |
Get an internal identifier used to reference this mesh in operations like deferred mesh building, or instance updating. | MuR/Mesh.h | |
const FMeshBufferSet & GetIndexBuffers () |
MuR/Mesh.h | ||
| Index buffers. They are owned by this mesh. | MuR/Mesh.h | ||
int32 GetIndexCount() |
MuR/Mesh.h | ||
TSharedPtr< const FLayout > GetLayout
(
int32 Index |
MuR/Mesh.h | ||
int32 GetLayoutCount() |
MuR/Mesh.h | ||
TSharedPtr< const FPhysicsBody > GetPhysicsBody() |
MuR/Mesh.h | ||
uint32 GetReferencedMesh() |
Return the id of the engine referenced mesh. Only valid if IsReference. | MuR/Mesh.h | |
const FString & GetReferencedMorph() |
MuR/Mesh.h | ||
TSharedPtr< const FSkeleton > GetSkeleton() |
MuR/Mesh.h | ||
int32 GetSkeletonID
(
int32 SkeletonIndex |
MuR/Mesh.h | ||
int32 GetSkeletonIDsCount() |
MuR/Mesh.h | ||
const TArray< uint64 > & GetStreamedResources() |
MuR/Mesh.h | ||
void GetSurface
(
int32 SurfaceIndex, |
MuR/Mesh.h | ||
int32 GetSurfaceCount () |
Get the number of surfaces defined in this mesh. | MuR/Mesh.h | |
uint32 GetSurfaceId
(
int32 SurfaceIndex |
Return an internal id that can be used to match mesh surfaces and instance surfaces. | MuR/Mesh.h | |
const FString & GetTag
(
int32 TagIndex |
MuR/Mesh.h | ||
int32 GetTagCount() |
MuR/Mesh.h | ||
| Vertex buffers. They are owned by this mesh. | MuR/Mesh.h | ||
const FMeshBufferSet & GetVertexBuffers () |
MuR/Mesh.h | ||
int32 GetVertexCount() |
MuR/Mesh.h | ||
void GetVertexMap
(
const FMesh& Other, |
MuR/Mesh.h | ||
bool HasCompatibleFormat
(
const FMesh* Other |
Return true if the given mesh has the same vertex and index formats, and in the same buffer structure. | MuR/Mesh.h | |
bool IsClosed() |
Return true if this mesh is closed. It is still closed if it has dangling vertices. | MuR/Mesh.h | |
bool IsForceLoad() |
If true, this is a reference that must be resolved at compile time. | MuR/Mesh.h | |
bool IsReference() |
Return true if this is a reference to an engine image. | MuR/Mesh.h | |
bool IsSimilar
(
const FMesh& Other |
Compare the mesh with another one, but ignore internal data like generated vertex indices. | MuR/Mesh.h | |
void Log
(
FString& Out, |
Debug: get a text representation of the mesh | MuR/Mesh.h | |
void MakeIdsExplicit() |
Ensure the format of an empty mesh includes explicit IDs. The mesh cannot have any vertex data. | MuR/Mesh.h | |
void MakeVertexIdsRelative() |
Create an explicit vertex buffer for vertex IDs if they are implicit. | MuR/Mesh.h | |
void ResetBufferIndices() |
Change the buffer descriptions so that all buffer indices start at 0 and are in the same order than memory. | MuR/Mesh.h | |
void ResetStaticFormatFlags() |
Update the flags identifying the mesh format as some of the optimised formats. | MuR/Mesh.h | |
void Serialise
(
FOutputArchive& arch |
MuR/Mesh.h | ||
| Set the bonemap of this mesh. | MuR/Mesh.h | ||
void SetBonePose
(
int32 Index, |
MuR/Mesh.h | ||
void SetBonePoseCount
(
int32 Count |
MuR/Mesh.h | ||
void SetLayout
(
int32 Index, |
MuR/Mesh.h | ||
void SetPhysicsBody
(
TSharedPtr< const FPhysicsBody > |
MuR/Mesh.h | ||
void SetReferencedMorph
(
const FString& MorphName |
Mesh references can actually reference a morphed mesh. | MuR/Mesh.h | |
void SetSkeleton
(
TSharedPtr< const FSkeleton > |
MuR/Mesh.h | ||
void SetTag
(
int32 TagIndex, |
MuR/Mesh.h | ||
void SetTagCount
(
int32 Count |
MuR/Mesh.h | ||
void Unserialise
(
FInputArchive& arch |
MuR/Mesh.h |
Overridden from FResource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 GetDataSize() |
Return the size in bytes of all the LODs of the image. | MuR/Mesh.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedPtr< FMesh > CreateAsReference
(
uint32 ID, |
Life cycle. | MuR/Mesh.h | |
static void Serialise
(
const FMesh* InMesh, |
Serialisation | MuR/Mesh.h | |
static TSharedPtr< FMesh > StaticUnserialise
(
FInputArchive& Arch |
MuR/Mesh.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator==
(
const FMesh& Other |
MuR/Mesh.h |