class

MStaticMeshComponent

Module
Game
Header
#include "Game/MStaticMeshComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
std::stringmeshPathAsset reference — path to the .mmodel.
std::stringmeshTypePrimitive type name (GPUMesh::PrimitiveTypes: "cube", "sphere", "plane", "cylinder", "capsule", "cone", "quad", "torus", "wedge", "stairs", "mannequin") — same vocabulary as MeshRendererComponent::meshType. Empty for file-based meshes.
std::stringmaterialPath
boolcastShadowsDefault true.
boolreceiveShadowsDefault true.
boolrenderCustomDepthDefault false.
int32_tcustomStencilDefault 0.
boolreceiveDecalsDefault true.
boolvisibleDefault true.

Constructors

SignatureNameDescription
MStaticMeshComponent()MStaticMeshComponentmember-cleanup path), and this header only forward-declares it.
~MStaticMeshComponent() override~MStaticMeshComponent

Public functions

ReturnsNameDescription
voidOnRegisterMirror MeshRenderer state onto the owner's backing ECS entity.
voidPullFromMirror
voidSetMeshPrimitiveRuntime mesh switching — set the source and re-mirror in one call (the OnRegister mirror only runs once at spawn; changes after that must go through these or the entity keeps drawing the old mesh).
voidSetMeshPath
voidRefreshMirrorRe-push meshType/meshPath/visible onto the mirrored MeshRendererComponent (including hydration).
boolGetSocketLocalTransformSockets are the NAMED transforms the mesh itself carries (its .mmeshmeta) — a muzzle, a door handle, a roof mount.

Function details

MStaticMeshComponent

C++
MStaticMeshComponent()

member-cleanup path), and this header only forward-declares it.

~MStaticMeshComponent

C++
~MStaticMeshComponent() override

OnRegister

C++
void OnRegister() override

Mirror MeshRenderer state onto the owner's backing ECS entity.

PullFromMirror

C++
void PullFromMirror(World* ecs, EntityID entity) override

SetMeshPrimitive

C++
void SetMeshPrimitive(const std::string& type)

Runtime mesh switching — set the source and re-mirror in one call (the OnRegister mirror only runs once at spawn; changes after that must go through these or the entity keeps drawing the old mesh).

SetMeshPath

C++
void SetMeshPath(const std::string& path)

RefreshMirror

C++
void RefreshMirror() override

Re-push meshType/meshPath/visible onto the mirrored MeshRendererComponent (including hydration). No-op before OnRegister or without a backing entity.

GetSocketLocalTransform

C++
bool GetSocketLocalTransform(const std::string& socketName, Vec3& outPos, Quat& outRot) const override

Sockets are the NAMED transforms the mesh itself carries (its .mmeshmeta) — a muzzle, a door handle, a roof mount. The base class answers false for everything, which is why attaching to anything but a skeletal bone used to be impossible.

Generated from Game/MStaticMeshComponent.h via game.json · Nov 5, 2026Version 1.0.0