AR + GPS Location  3.0.0
All Classes Namespaces Functions Variables Properties Events Pages
ARLocation.CatmullRomCurve Class Reference

A catmull-rom curve. More...

Inheritance diagram for ARLocation.CatmullRomCurve:
ARLocation.Curve

Public Member Functions

 CatmullRomCurve (Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float alpha)
 Creates a catmull-rom curve with control points p0, p1, p2 and p3, and with a given alpha/tension parameter. More...
 
override Vector3 GetPoint (float u)
 Calculates the curve at a point u, where u is between 0 and 1. More...
 
override CurvePointData GetPointAndTangent (float u)
 Calculates the point and the tangent of the curve. More...
 
override Vector3[] Sample (int n)
 Creates a sample of (N+2) points (i.e., N + start and end points) of the current curve. Also calculates the length estimate. More...
 
override float EstimateLength (int n=100)
 Returns the estimated length. More...
 
override float GetParameterForLength (float s)
 Gets the curve parameter for a given length. More...
 
override Vector3 GetPointAtLength (float s)
 Gets the curve point at a given length. More...
 
override CurvePointData GetPointAndTangentAtLength (float s)
 Gets the CurvePointData which stores the point and tangent at a given arc-length. More...
 

Properties

float T0 [get]
 
float T1 [get]
 
float T2 [get]
 
float T3 [get]
 
float Alpha [get, set]
 Gets or sets the alpha. More...
 
Vector3 P0 [get, set]
 
Vector3 P1 [get, set]
 
Vector3 P2 [get, set]
 
Vector3 P3 [get, set]
 

Detailed Description

A catmull-rom curve.

Definition at line 8 of file CatmullRomCurve.cs.

Constructor & Destructor Documentation

◆ CatmullRomCurve()

ARLocation.CatmullRomCurve.CatmullRomCurve ( Vector3  p0,
Vector3  p1,
Vector3  p2,
Vector3  p3,
float  alpha 
)

Creates a catmull-rom curve with control points p0, p1, p2 and p3, and with a given alpha/tension parameter.

Parameters
p0
p1
p2
p3
alpha

Definition at line 144 of file CatmullRomCurve.cs.

Member Function Documentation

◆ EstimateLength()

override float ARLocation.CatmullRomCurve.EstimateLength ( int  n = 100)
virtual

Returns the estimated length.

Returns
The length.
Parameters
nN.

Implements ARLocation.Curve.

Definition at line 269 of file CatmullRomCurve.cs.

◆ GetParameterForLength()

override float ARLocation.CatmullRomCurve.GetParameterForLength ( float  s)
virtual

Gets the curve parameter for a given length.

Returns
The parameter for length.
Parameters
sS.

Implements ARLocation.Curve.

Definition at line 284 of file CatmullRomCurve.cs.

◆ GetPoint()

override Vector3 ARLocation.CatmullRomCurve.GetPoint ( float  u)
virtual

Calculates the curve at a point u, where u is between 0 and 1.

Parameters
uThe curve parameter in the [0, 1] interval.
Returns

Implements ARLocation.Curve.

Definition at line 172 of file CatmullRomCurve.cs.

◆ GetPointAndTangent()

override CurvePointData ARLocation.CatmullRomCurve.GetPointAndTangent ( float  u)
virtual

Calculates the point and the tangent of the curve.

Parameters
uThe curve parameter in the [0, 1] interval.
Returns

Implements ARLocation.Curve.

Definition at line 194 of file CatmullRomCurve.cs.

◆ GetPointAndTangentAtLength()

override CurvePointData ARLocation.CatmullRomCurve.GetPointAndTangentAtLength ( float  s)
virtual

Gets the CurvePointData which stores the point and tangent at a given arc-length.

Parameters
s
Returns

Implements ARLocation.Curve.

Definition at line 319 of file CatmullRomCurve.cs.

◆ GetPointAtLength()

override Vector3 ARLocation.CatmullRomCurve.GetPointAtLength ( float  s)
virtual

Gets the curve point at a given length.

Returns
The point at length.
Parameters
sS.

Implements ARLocation.Curve.

Definition at line 308 of file CatmullRomCurve.cs.

◆ Sample()

override Vector3 [] ARLocation.CatmullRomCurve.Sample ( int  n)
virtual

Creates a sample of (N+2) points (i.e., N + start and end points) of the current curve. Also calculates the length estimate.

Returns
The sample.
Parameters
nN.

Implements ARLocation.Curve.

Definition at line 230 of file CatmullRomCurve.cs.

Property Documentation

◆ Alpha

float ARLocation.CatmullRomCurve.Alpha
getset

Gets or sets the alpha.

The alpha.

Definition at line 60 of file CatmullRomCurve.cs.


The documentation for this class was generated from the following file: