class

MSplineComponent

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

Properties

TypeNameDescription
boolclosedLoopClosed loop: the last segment wraps back to the first point. Default false.

Constructors

SignatureNameDescription
MSplineComponent() = defaultMSplineComponent

Public functions

ReturnsNameDescription
voidOnRegister
voidPullFromMirror
voidAddPointControl points (local space, relative to the owning actor).
voidSetPoint
voidClearPoints
int32_tGetPointCount
Vec3GetPoint
voidSetClosedLoop
boolIsClosedLoop
Vec3SampleLocalSampling t in [0,1] across the whole spline (uniform in segment space — NOT arc length; use SampleWorldByDistance for constant speed).
Vec3SampleWorld
Vec3DirectionWorldUnit direction of travel at t, in world space.
floatRollAtRoll (degrees) and cross-section scale at t, blended between points.
Vec2ScaleAt
floatGetLengthArc-length helpers: approximate length, and constant-speed sampling by distance along the spline.
Vec3SampleWorldByDistance
const std::vector<FSplinePoint>&PointsThe points this component samples: the Spline component's once registered, its own before that.

Function details

MSplineComponent

C++
MSplineComponent() = default

OnRegister

C++
void OnRegister() override

PullFromMirror

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

AddPoint

C++
void AddPoint(const Vec3& localPos)

Control points (local space, relative to the owning actor).

SetPoint

C++
void SetPoint(int32_t index, const Vec3& localPos)

ClearPoints

C++
void ClearPoints()

GetPointCount

C++
int32_t GetPointCount() const

GetPoint

C++
Vec3 GetPoint(int32_t index) const

SetClosedLoop

C++
void SetClosedLoop(bool closed)

IsClosedLoop

C++
bool IsClosedLoop() const

SampleLocal

C++
Vec3 SampleLocal(float t) const

Sampling t in [0,1] across the whole spline (uniform in segment space — NOT arc length; use SampleWorldByDistance for constant speed).

SampleWorld

C++
Vec3 SampleWorld(float t) const

DirectionWorld

C++
Vec3 DirectionWorld(float t) const

Unit direction of travel at t, in world space.

RollAt

C++
float RollAt(float t) const

Roll (degrees) and cross-section scale at t, blended between points.

ScaleAt

C++
Vec2 ScaleAt(float t) const

GetLength

C++
float GetLength(int subdivisionsPerSegment = 16) const

Arc-length helpers: approximate length, and constant-speed sampling by distance along the spline.

SampleWorldByDistance

C++
Vec3 SampleWorldByDistance(float distance, int subdivisionsPerSegment = 16) const

Points

C++
const std::vector<FSplinePoint>& Points() const

The points this component samples: the Spline component's once registered, its own before that.

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