Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

VRageMath.Curve

Morten Aune Lyrstad edited this page Apr 16, 2022 · 41 revisions

IndexNamespace Index

Curve Class

public class Curve

Stores an arbitrary collection of 2D CurveKey points, and provides methods for evaluating features of the curve they define.

Namespace: VRageMath
Assembly: VRage.Math.dll

Properties

bool IsConstant { get; }

Gets a value indicating whether the curve is constant.

CurveKeyCollection Keys { get; }

The points that make up the curve.

CurveLoopType PostLoop { get; set; }

Specifies how to handle weighting values that are greater than the last control point in the curve.

CurveLoopType PreLoop { get; set; }

Specifies how to handle weighting values that are less than the first control point in the curve.

Constructors

Curve()

Methods

Curve Clone()

Creates a copy of the Curve.

void ComputeTangent(int keyIndex, CurveTangent tangentType)

Computes both the TangentIn and the TangentOut for a CurveKey specified by its index.

void ComputeTangent(int keyIndex, CurveTangent tangentInType, CurveTangent tangentOutType)

Computes a specified type of TangentIn and a specified type of TangentOut for a given CurveKey.

void ComputeTangents(CurveTangent tangentType)

Computes all tangents for all CurveKeys in this Curve, using a specified tangent type for both TangentIn and TangentOut.

void ComputeTangents(CurveTangent tangentInType, CurveTangent tangentOutType)

Computes all tangents for all CurveKeys in this Curve, using different tangent types for TangentOut and TangentIn.

float Evaluate(float position)

Finds the value at a position on the Curve.

Clone this wiki locally