Table of Contents

Struct LinearBezier3

Namespace
Xui.Core.Curves3D
Assembly
Xui.Core.dll

Represents a linear (degree-1) Bézier curve in 3D space — a straight line segment from P0 to P1.

public readonly struct LinearBezier3 : ICurve3
Implements
Inherited Members

Constructors

LinearBezier3(Point3, Point3)

Initializes a new LinearBezier3 with the specified endpoints.

public LinearBezier3(Point3 p0, Point3 p1)

Parameters

p0 Point3
p1 Point3

Fields

P0

The starting point of the segment.

public readonly Point3 P0

Field Value

Point3

P1

The ending point of the segment.

public readonly Point3 P1

Field Value

Point3

Properties

this[float]

Evaluates the curve at the given parameter t. Alias for Lerp(float).

public Point3 this[float t] { get; }

Parameters

t float

Property Value

Point3

Methods

Length()

Returns the length of the segment (the Euclidean distance from P0 to P1).

public float Length()

Returns

float

Length(float)

Returns the length of the segment. The precision parameter is ignored for linear segments.

public float Length(float precision)

Parameters

precision float

Returns

float

Lerp(float)

Evaluates the segment at parameter t.

public Point3 Lerp(float t)

Parameters

t float

A normalized parameter in the range [0, 1].

Returns

Point3

Tangent(float)

Returns the constant tangent (direction) of the segment.

public Vector3 Tangent(float t)

Parameters

t float

Ignored — the tangent is constant for a linear segment.

Returns

Vector3

ToCubic()

Converts this linear segment to a CubicBezier3 with collinear controls.

public CubicBezier3 ToCubic()

Returns

CubicBezier3

ToQuadratic()

Converts this linear segment to a QuadraticBezier3 with a midpoint control.

public QuadraticBezier3 ToQuadratic()

Returns

QuadraticBezier3

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.