FMeshAssetMeta
Everything authored ON a model that the model file itself cannot hold.
- Module
- Physics
- Header
#include "Physics/MeshCollision.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
static constexpr const char* | kRootType | Default "MeshMeta". |
static constexpr const char* | kCollisionType | Default "Collision". |
static constexpr const char* | kPrimitiveType | Default "Primitive". |
static constexpr const char* | kSocketType | Default "Socket". |
static constexpr const char* | kSlotType | Default "MaterialSlot". |
static constexpr const char* | kSurfaceCacheType | Default "SurfaceCache". |
static constexpr const char* | kVirtualBoneType | Default "VirtualBone". |
static constexpr const char* | kClothMaskType | Default "ClothMask". |
static constexpr const char* | kSourceKey | Default "source". |
static constexpr const char* | kTargetKey | Default "target". |
static constexpr const char* | kSubmeshKey | Default "submesh". |
static constexpr const char* | kWeightsKey | Default "weights". |
static constexpr const char* | kComplexityKey | Default "complexity". |
static constexpr const char* | kShapeKey | Default "shape". |
static constexpr const char* | kCenterKey | Default "center". |
static constexpr const char* | kRotationKey | Default "rotation". |
static constexpr const char* | kHalfExtentsKey | Default "half_extents". |
static constexpr const char* | kRadiusKey | Default "radius". |
static constexpr const char* | kHalfHeightKey | Default "half_height". |
static constexpr const char* | kPointsKey | Default "points". |
static constexpr const char* | kBoneKey | Default "bone". |
static constexpr const char* | kPositionKey | Default "position". |
static constexpr const char* | kScaleKey | Default "scale". |
static constexpr const char* | kMaterialKey | Default "material". |
static constexpr const char* | kPhysicsAssetKey | Default "physics_asset". |
static constexpr const char* | kCardSetModeKey | Default "card_set_mode". |
static constexpr const char* | kMaxCardsKey | Default "max_cards". |
static constexpr const char* | kDecompositionType | Default "Decomposition". |
static constexpr const char* | kAutoConvexKey | Default "auto". |
static constexpr const char* | kMaxHullsKey | Default "max_hulls". |
static constexpr const char* | kHullVerticesKey | Default "hull_vertices". |
static constexpr const char* | kConcavityKey | Default "concavity". |
static constexpr const char* | kMinTrianglesKey | Default "min_triangles_per_hull". |
static constexpr const char* | kMaxDepthKey | Default "max_depth". |
static constexpr const char* | kMaxTrianglesKey | Default "max_triangles". |
static constexpr uint32_t | kDefaultMaxCards | MmodelBuildOptions::maxMeshCards and FMeshCardBuildOptions::MaxCards agree on 8; the ceiling is the .mmodel format's MMODEL_MAX_CARDS_PER_MESH. Both are repeated here rather than included because this header sits below AssetFormats and is read by three modules that cannot link to each other. Default 8. |
static constexpr uint32_t | kMaxCardsCeiling | Default 32. |
EMeshCollisionComplexity | Complexity | Default EMeshCollisionComplexity::SimpleAndComplex. |
EMeshCardSetMode | CardSetMode | Default EMeshCardSetMode::Auto. |
uint32_t | MaxCards | Default kDefaultMaxCards. |
std::vector<FMeshCollisionPrimitive> | Primitives | |
std::vector<FMeshSocket> | Sockets | |
std::vector<FMeshMaterialSlotBinding> | SlotMaterials | |
std::vector<FMeshVirtualBone> | VirtualBones | |
std::vector<FMeshClothMask> | ClothMasks | |
bool | AutoConvexCollision | Whether the collision cook may split a concave mesh into hulls when nobody authored simple collision for it. On by default: the alternative is the single hull that swallows the silhouette, which is a solid block wherever the mesh has a hole. A convex mesh measures convex and stays on the single-hull path either way, so the default costs it nothing. Default true. |
FMeshDecompositionSettings | Decomposition | |
std::string | PhysicsAsset | The .physasset authored against this skeletal mesh. Stored on the mesh so a ragdoll follows the character everywhere it is placed, instead of being re-picked per actor in every level. |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | IsEmpty | An emptied setup deletes the sidecar, so every authored field has to be named here — a card-set override alone would otherwise be written and then removed by the same Save. |
const FMeshVirtualBone* | FindVirtualBone | |
std::string | MakeUniqueVirtualBoneName | |
const FMeshClothMask* | FindClothMask | |
FMeshClothMask& | ClothMaskFor | The mask to paint into, created fully free (1) or re-sized to the mesh when the topology it was painted on no longer matches. |
void | RemoveClothMask | |
bool | HasDecompositionOverride | Whether anything about the decomposition was moved off its default. |
bool | HasSimpleCollision | |
bool | HasCardSetOverride | |
bool | BuildsMeshCards | The two questions both card producers ask — the cook (MmodelBuilder) and the live Assimp import (ModelResource). |
uint32_t | MeshCardLimit | |
const FMeshSocket* | FindSocket | |
const std::string& | MaterialForSlot | |
void | SetMaterialForSlot | |
std::string | MakeUniqueSocketName | |
std::string | MakeUniquePrimitiveName | |
std::string | SidecarPathFor | <model>.fbx / <model>.fbx.mmodel / <model>.mmodel → <model>.mmeshmeta. |
const char* | ShapeName | |
EMeshCollisionShape | ShapeFromName | |
const char* | ComplexityName | |
const char* | CardSetModeName | |
EMeshCardSetMode | CardSetModeFromName | |
EMeshCollisionComplexity | ComplexityFromName | |
void | ReadRoot | |
void | WriteRoot | Only what was actually authored is written. |
std::string | SerializeToString | |
bool | DeserializeFromString | |
bool | LoadFromFile | |
bool | SaveToFile |
Function details
IsEmpty
bool IsEmpty() constAn emptied setup deletes the sidecar, so every authored field has to be named here — a card-set override alone would otherwise be written and then removed by the same Save.
FindVirtualBone
const FMeshVirtualBone* FindVirtualBone(const std::string& name) constMakeUniqueVirtualBoneName
std::string MakeUniqueVirtualBoneName(const std::string& base) constFindClothMask
const FMeshClothMask* FindClothMask(int32_t submesh) constClothMaskFor
FMeshClothMask& ClothMaskFor(int32_t submesh, size_t vertexCount)The mask to paint into, created fully free (1) or re-sized to the mesh when the topology it was painted on no longer matches.
RemoveClothMask
void RemoveClothMask(int32_t submesh)HasDecompositionOverride
bool HasDecompositionOverride() constWhether anything about the decomposition was moved off its default. The sidecar is deleted when the setup is empty, so a mesh whose only authored thing is a hull budget has to count as authored or the Save that wrote it would remove it again.
HasSimpleCollision
bool HasSimpleCollision() constHasCardSetOverride
bool HasCardSetOverride() constBuildsMeshCards
bool BuildsMeshCards() constThe two questions both card producers ask — the cook (MmodelBuilder) and the live Assimp import (ModelResource). They are here rather than in each producer because a mesh that clustered at cook and not on import lights differently in the editor than in the packaged build, with nothing failing.
MeshCardLimit
uint32_t MeshCardLimit(uint32_t fallback) constFindSocket
const FMeshSocket* FindSocket(const std::string& name) constMaterialForSlot
const std::string& MaterialForSlot(const std::string& slot) constSetMaterialForSlot
void SetMaterialForSlot(const std::string& slot, const std::string& material)MakeUniqueSocketName
std::string MakeUniqueSocketName(const std::string& base) constMakeUniquePrimitiveName
std::string MakeUniquePrimitiveName(const std::string& base) constSidecarPathFor
static std::string SidecarPathFor(const std::string& modelPath)<model>.fbx / <model>.fbx.mmodel / <model>.mmodel → <model>.mmeshmeta. The cooked container appends .mmodel to the source name, so both spellings have to collapse onto one sidecar or the editor would author against the source and the runtime would read nothing.
ShapeName
static const char* ShapeName(EMeshCollisionShape shape)ShapeFromName
static EMeshCollisionShape ShapeFromName(const std::string& name)ComplexityName
static const char* ComplexityName(EMeshCollisionComplexity complexity)CardSetModeName
static const char* CardSetModeName(EMeshCardSetMode mode)CardSetModeFromName
static EMeshCardSetMode CardSetModeFromName(const std::string& name)ComplexityFromName
static EMeshCollisionComplexity ComplexityFromName(const std::string& name)ReadRoot
void ReadRoot(const MDF::MdfNode& root)WriteRoot
void WriteRoot(MDF::MdfNode& root) constOnly what was actually authored is written. An empty Collision node in every sidecar would make the diff of one stop saying what changed, which is the whole reason the animation sidecar writes deltas too.
SerializeToString
std::string SerializeToString() constDeserializeFromString
static bool DeserializeFromString(const std::string& text, FMeshAssetMeta& out)LoadFromFile
static bool LoadFromFile(FMeshAssetMeta& out, const std::string& path)SaveToFile
bool SaveToFile(const std::string& path) const