Class SplineSpaceComponent

Inheritance Relationships

Base Type

Class Documentation

class SplineSpaceComponent : public csp::multiplayer::ComponentBase

Add a spline curve to your space.

This can be used in conjunction with Scripts to align/animate objects along its length.

Public Functions

SplineSpaceComponent(SpaceEntity *Parent)

Constructs the spline space component, and associates it with the specified Parent space entity.

Parameters

Parent – The Space entity that owns this component.

csp::common::Vector3 GetLocationAlongSpline(float NormalisedDistance)

Generate a vector3 at a chosen position along the spline Note: Generates a cubic spline position from current Waypoints.

Parameters

NormalisedDistance – float : Distance along the spline being evaluated between a value of 0 and 1

Returns

position value of X,Y,Z in Vector3 format of the generated spline position

csp::common::List<csp::common::Vector3> GetWaypoints() const

Get waypoints used to generate spline Note: Get the number of positions generated by the spline.

Returns

Current waypoint Values Set

void SetWaypoints(const csp::common::List<csp::common::Vector3> &Waypoints)

Set waypoints to generate the spline Note: Set the number of positions generated by the spline.

Parameters

Value – csp::common::List<csp::common::Vector3> : number of positions between each waypoint