Enfusion Script API
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Math3D Interface Reference

Static Public Member Functions

static proto float IntersectionRayBox (vector start, vector end, vector mins, vector maxs)
 
static proto float IntersectionRaySphere (vector raybase, vector raycos, vector center, float radius)
 Tests whether intersection of ray and sphere exists and returns distance to intersection from raybase and raycos (I{01} = P + dir*t{01}).
 
static proto bool IntersectionSphereCone (vector origin, float radius, vector conepos, vector axis, float angle)
 Tests whether sphere is intersecting cone.
 
static proto bool IntersectionWholeSphereCone (vector origin, float radius, vector conepos, vector axis, float angle)
 Tests whether sphere is intersecting cone.
 
static proto bool IntersectionPointCylinder (vector origin, vector cylinderTip, vector cylinderAxis, float cylinderRadius)
 Tests whether point is intersecting cylinder.
 
static proto bool IntersectionSphereAABB (vector origin, float radius, vector mins, vector maxs)
 Tests whether sphere is intersecting AABB.
 
static proto bool IntersectionBoxBox (vector mins1, vector maxs1, vector mins2, vector maxs2)
 Returns true, when bounding boxes intersect.
 
static proto void DirectionAndUpMatrix (vector dir, vector up, out vector mat[4])
 Creates rotation matrix from direction and up vector.
 
static proto void MatrixMultiply3 (vector mat0[3], vector mat1[3], out vector res[3])
 Transforms rotation matrix.
 
static proto void MatrixMultiply4 (vector mat0[4], vector mat1[4], out vector res[4])
 Transforms matrix.
 
static proto void MatrixGetInverse3 (vector mat[3], out vector res[3])
 Inverts matrix.
 
static proto void MatrixGetInverse4 (vector mat[4], out vector res[4])
 Inverts matrix.
 
static proto void MatrixInvMultiply3 (vector mat0[3], vector mat1[3], out vector res[3])
 Invert-transforms rotation matrix.
 
static proto void MatrixInvMultiply4 (vector mat0[4], vector mat1[4], out vector res[4])
 Invert-transforms matrix.
 
static proto void MatrixToQuat (vector mat[3], out float d[4])
 Converts rotation matrix to quaternion.
 
static proto vector MatrixToAngles (vector mat[3])
 Returns angles of rotation matrix.
 
static proto float MatrixToAnglesAndScale (vector mat[3], out vector angles)
 Returns angles and scale of rotation matrix.
 
static proto void MatrixFromForwardVec (vector forwardVec, out vector mat[3])
 
static proto void MatrixFromUpVec (vector upVec, out vector mat[3])
 
static proto void AnglesToMatrix (vector ang, out vector mat[3])
 Creates rotation matrix from angles (yaw, pitch, roll in degrees).
 
static proto void MatrixIdentity4 (out vector mat[4])
 Creates identity matrix.
 
static proto void MatrixIdentity3 (out vector mat[3])
 Creates identity matrix.
 
static proto void MatrixCopy (vector matSrc[], out vector matDst[])
 Copy matrixes.
 
static proto void MatrixNormalize (vector mat[])
 Normalize matrix.
 
static proto void MatrixScale (vector mat[], float scale)
 Scale matrix.
 
static proto void QuatIdentity (out float q[4])
 Creates identity quaternion.
 
static proto void QuatCopy (float s[4], out float d[4])
 Copies quaternion.
 
static proto void QuatToMatrix (float q[4], out vector mat[3])
 Converts quaternion to rotation matrix.
 
static proto float QuatNormalize (out float quat[4])
 Normalizes quaternion.
 
static proto void QuatLerp (out float qout[4], float q1[4], float q2[4], float frac)
 Linear interpolation between q1 and q2 with weight frac (0...1).
 
static proto void QuatMultiply (out float qout[4], float q1[4], float q2[4])
 Multiplies quaternions.
 
static proto float QuatAngle (float q1[4], float q2[4])
 Returns a float value equal to the angle between two quaternions.
 
static proto float QuatDot (float q1[4], float q2[4])
 Returns a float value equal to the dot product of two quaternions.
 
static proto void QuatRotateTowards (out float qout[4], float q1[4], float q2[4], float maxDegreesDelta)
 Returns a quaternion qout that is rotated between quaternions q1 and q2.
 
static proto float QuatNorm (float quat[4])
 Returns the norm of a quaternion.
 
static proto float QuatLength (float quat[4])
 Returns the magnitude of a quaternion.
 
static proto void QuatInverse (out float qout[4], float q[4])
 Inverse quaternion.
 
static proto void QuatScale (out float qout[4], float scale)
 Multiply each part of quaternion by scalar.
 
static proto void QuatConjugate (out float qout[4], float q[4])
 Conjugate quaternion.
 
static proto vector QuatToAngles (float q[4])
 Returns Angles vector (yaw, pitch, roll) from quaternion.
 
static proto vector Curve (ECurveType type, float param, notnull array< vector > points, array< float > knots=null)
 Computes curve.
 
static proto vector Curve3 (ECurveType type, float param, notnull Curve3 points, int curveIndex, array< float > knots=null)
 Evaluates a single curve from multicurve object.
 
static proto void TessellateBezierSpline (array< vector > points, array< vector > segmentPoints, float maxDistance, int maxPointsPerSegment, array< vector > outPoints)
 Generates tessellation of a cubic, C0 Bezier spline.
 
static proto void TessellateHermiteSpline (array< vector > points, array< vector > tangents, float maxDistance, int maxPointsPerSegment, array< vector > outPoints)
 Generates tessellation of a cubic, C0 Hermite spline.
 
static proto int PolyToTriangles (vector in[], int num, out int indices[])
 Convert polygon to triangles.
 
static proto float PointLineSegmentDistanceSqr (vector point, vector v0, vector v1)
 Calculates squared distance of point to a line segment given by points v0 and v1.
 
static proto float PointLineSegmentDistance (vector point, vector v0, vector v1)
 Calculates distance of point to a line segment given by points v0 and v1.
 
static proto float PointLineDistance (vector point, vector pointOnLine, vector dirVector)
 Calculates distance of point to a parametric line given by a point on line and direction vector.
 
static proto bool IntersectionLineSegments (vector p11, vector p12, vector p21, vector p22)
 Determines whether two line segments intersect or not.
 

Member Function Documentation

◆ AnglesToMatrix()

static proto void Math3D.AnglesToMatrix ( vector  ang,
out vector  mat[3] 
)
static

Creates rotation matrix from angles (yaw, pitch, roll in degrees).

vector mat[3];
Math3D.AnglesToMatrix( "70 15 45", mat );
Print( mat );
>> <0.41382,-0.683013,-0.601869>,<0.069869,0.683013,-0.727057>,<0.907673,0.258819,0.330366>
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
Definition: Math3D.c:13
static proto void AnglesToMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles (yaw, pitch, roll in degrees).
Definition: vector.c:13
Parameters
angvector which contains angles
[out]matcreated rotation matrix

◆ Curve()

static proto vector Math3D.Curve ( ECurveType  type,
float  param,
notnull array< vector points,
array< float knots = null 
)
static

Computes curve.

Knots array is used only for non-uniform curve types. For example, CatmullRom and CurveProperty2D.

auto points = new array<vector>();
points.Insert( Vector( 0, 0, 0) );
points.Insert( Vector( 5, 0, 0) );
points.Insert( Vector( 8, 3, 0) );
points.Insert( Vector( 6, 1, 0) );
float t = 0.5;
vector result = Math3D.Curve(ECurveType.CatmullRom, t, points);
ECurveType
Definition: ECurveType.c:13
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto vector Curve(ECurveType type, float param, notnull array< vector > points, array< float > knots=null)
Computes curve.
Definition: Types.c:150

◆ Curve3()

static proto vector Math3D.Curve3 ( ECurveType  type,
float  param,
notnull Curve3  points,
int  curveIndex,
array< float knots = null 
)
static

Evaluates a single curve from multicurve object.

See also
Curve

◆ DirectionAndUpMatrix()

static proto void Math3D.DirectionAndUpMatrix ( vector  dir,
vector  up,
out vector  mat[4] 
)
static

Creates rotation matrix from direction and up vector.

vector mat[4];
vector dir = "1 0 1";
vector up = "0 1 0";
DirectionAndUpMatrix( dir, up, mat );
Print( mat );
>> <0.707107,0,-0.707107>,<0,1,0>,<0.707107,0,0.707107>,<0,0,0>
static proto void DirectionAndUpMatrix(vector dir, vector up, out vector mat[4])
Creates rotation matrix from direction and up vector.
Parameters
dirdirection vector
upup vector
[out]matcreated rotation matrix

◆ IntersectionBoxBox()

static proto bool Math3D.IntersectionBoxBox ( vector  mins1,
vector  maxs1,
vector  mins2,
vector  maxs2 
)
static

Returns true, when bounding boxes intersect.

vector mins1 = "1 1 1";
vector maxs1 = "3 3 3";
vector mins2 = "2 2 2";
vector maxs2 = "4 4 4";
Print( Math3D.IntersectionBoxBox(mins1, maxs1, mins2, maxs2) );
>> 1
static proto bool IntersectionBoxBox(vector mins1, vector maxs1, vector mins2, vector maxs2)
Returns true, when bounding boxes intersect.
Parameters
mins1Minimum point of first bounding box.
maxs1Maximum point of first bounding box.
mins2Minimum point of second bounding box.
maxs2Maximum point of second bounding box.
Returns
true when bounding boxes intersect, otherwise false.

◆ IntersectionLineSegments()

static proto bool Math3D.IntersectionLineSegments ( vector  p11,
vector  p12,
vector  p21,
vector  p22 
)
static

Determines whether two line segments intersect or not.

Parameters
p11First point of the first segment
p12Second point of the first segment
p21First point of the second segment
p22Second point of the second segment
Returns
true if the segments intersect, false otherwise.

◆ IntersectionPointCylinder()

static proto bool Math3D.IntersectionPointCylinder ( vector  origin,
vector  cylinderTip,
vector  cylinderAxis,
float  cylinderRadius 
)
static

Tests whether point is intersecting cylinder.

Parameters
originOrigin of point
cylinderTipTip of cylinder
cylinderAxisAxis of cylinder
cylinderRadiusRadius of cylinder
Returns
true when intersects

◆ IntersectionRayBox()

static proto float Math3D.IntersectionRayBox ( vector  start,
vector  end,
vector  mins,
vector  maxs 
)
static

◆ IntersectionRaySphere()

static proto float Math3D.IntersectionRaySphere ( vector  raybase,
vector  raycos,
vector  center,
float  radius 
)
static

Tests whether intersection of ray and sphere exists and returns distance to intersection from raybase and raycos (I{01} = P + dir*t{01}).

Parameters
raybasestart point of ray
raycosdirection of ray
centersphere center
radiusradius of sphere

◆ IntersectionSphereAABB()

static proto bool Math3D.IntersectionSphereAABB ( vector  origin,
float  radius,
vector  mins,
vector  maxs 
)
static

Tests whether sphere is intersecting AABB.

Parameters
originOrigin of sphere
radiusRadius of sphere
minsminimum point of bounding box
maxsmaximum point of bounding box
Returns
true when intersects

◆ IntersectionSphereCone()

static proto bool Math3D.IntersectionSphereCone ( vector  origin,
float  radius,
vector  conepos,
vector  axis,
float  angle 
)
static

Tests whether sphere is intersecting cone.

Parameters
originOrigin of sphere
radiusRadius of sphere
coneposPosition of top of cone
axisOrientation of cone in direction from top to bottom
angleAngle of cone in radians
Returns
true when intersects

◆ IntersectionWholeSphereCone()

static proto bool Math3D.IntersectionWholeSphereCone ( vector  origin,
float  radius,
vector  conepos,
vector  axis,
float  angle 
)
static

Tests whether sphere is intersecting cone.

Parameters
originOrigin of sphere
radiusRadius of sphere
coneposPosition of top of cone
axisOrientation of cone in direction from top to bottom
angleAngle of cone in radians
Returns
true when intersects

◆ MatrixCopy()

static proto void Math3D.MatrixCopy ( vector  matSrc[],
out vector  matDst[] 
)
static

Copy matrixes.

Parameters
matSrcvector[3] or vector[4]
[out]matDstvector[3] or vector[4]

◆ MatrixFromForwardVec()

static proto void Math3D.MatrixFromForwardVec ( vector  forwardVec,
out vector  mat[3] 
)
static

◆ MatrixFromUpVec()

static proto void Math3D.MatrixFromUpVec ( vector  upVec,
out vector  mat[3] 
)
static

◆ MatrixGetInverse3()

static proto void Math3D.MatrixGetInverse3 ( vector  mat[3],
out vector  res[3] 
)
static

Inverts matrix.

vector mat[3] = { "2 0 0", "0 3 0", "0 0 1" }; // rotation matrix
vector res[3];
Print( res );
>> <0.5,0,0>,<0,0.333,0>,<0,0,1>
static proto void MatrixGetInverse3(vector mat[3], out vector res[3])
Inverts matrix.
Parameters
matinput matrix
[out]resinverted matrix

◆ MatrixGetInverse4()

static proto void Math3D.MatrixGetInverse4 ( vector  mat[4],
out vector  res[4] 
)
static

Inverts matrix.

vector mat[4] = { "2 0 0 0", "0 3 0 0", "0 0 1 0", "0 0 0 5" }; // rotation matrix
vector res[4];
Print( res );
>> <0.5,0,0,0>,<0,0.333,0,0>,<0,0,1,0>,<0,0,0,0.2>
static proto void MatrixGetInverse4(vector mat[4], out vector res[4])
Inverts matrix.
Parameters
matinput matrix
[out]resinverted matrix

◆ MatrixIdentity3()

static proto void Math3D.MatrixIdentity3 ( out vector  mat[3])
static

Creates identity matrix.

vector mat[3];
Print( mat );
>> <1,0,0>,<0,1,0>,<0,0,1>
static proto void MatrixIdentity3(out vector mat[3])
Creates identity matrix.
Parameters
[out]matcreated identity matrix

◆ MatrixIdentity4()

static proto void Math3D.MatrixIdentity4 ( out vector  mat[4])
static

Creates identity matrix.

vector mat[4];
Print( mat );
>> <1,0,0>,<0,1,0>,<0,0,1>,<0,0,0>
static proto void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Parameters
[out]matcreated identity matrix

◆ MatrixInvMultiply3()

static proto void Math3D.MatrixInvMultiply3 ( vector  mat0[3],
vector  mat1[3],
out vector  res[3] 
)
static

Invert-transforms rotation matrix.

vector mat0[3] = { "1.5 2.5 0", "0.1 1.3 0", "0 0 1" }; // rotation matrix
vector mat1[3] = { "1 0.4 0", "0 1 0", "0 1.3 2.7" }; // rotation matrix
vector res[3];
Math3D.MatrixInvMultiply3(mat0, mat1, res);
Print( res );
>> <2.5,0.62,0>,<2.5,1.3,0>,<3.25,1.69,2.7>
static proto void MatrixInvMultiply3(vector mat0[3], vector mat1[3], out vector res[3])
Invert-transforms rotation matrix.
Parameters
mat0first matrix
mat1second matrix
[out]resresult of first and second matrix multiplication

◆ MatrixInvMultiply4()

static proto void Math3D.MatrixInvMultiply4 ( vector  mat0[4],
vector  mat1[4],
out vector  res[4] 
)
static

Invert-transforms matrix.

vector mat0[4] = { "2 0 0", "0 3 0", "0 0 1", "0 0 0" }; // scale matrix
vector mat1[4] = { "1 0 0", "0 1 0", "0 0 1", "2 4 1" }; // translation matrix
vector res[4];
Math3D.MatrixInvMultiply4(mat0, mat1, res);
Print( res );
>> <2,0,0>,<0,3,1>,<0,3,1>,<4,12,4>
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
Parameters
mat0first matrix
mat1second matrix
[out]resinverse result of first and second matrix multiplication

◆ MatrixMultiply3()

static proto void Math3D.MatrixMultiply3 ( vector  mat0[3],
vector  mat1[3],
out vector  res[3] 
)
static

Transforms rotation matrix.

vector mat0[3] = { "1.5 2.5 0", "0.1 1.3 0", "0 0 1" }; // rotation matrix
vector mat1[3] = { "1 0.4 0", "0 1 0", "0 1.3 2.7" }; // rotation matrix
vector res[3];
Math3D.MatrixMultiply3(mat0, mat1, res);
Print( res );
>> <1.54,3.02,0>,<0.1,1.3,0>,<0.13,1.69,2.7>
static proto void MatrixMultiply3(vector mat0[3], vector mat1[3], out vector res[3])
Transforms rotation matrix.
Parameters
mat0first matrix
mat1second matrix
[out]resresult of first and second matrix multiplication

◆ MatrixMultiply4()

static proto void Math3D.MatrixMultiply4 ( vector  mat0[4],
vector  mat1[4],
out vector  res[4] 
)
static

Transforms matrix.

vector mat0[4] = { "2 0 0", "0 3 0", "0 1 0", "0 0 0" }; // scale matrix
vector mat1[4] = { "1 0 0", "0 1 0", "0 1 0", "2 4 1" }; // translation matrix
vector res[4];
Math3D.MatrixMultiply4(mat0, mat1, res);
Print( res );
>> <2,0,0>,<0,3,0>,<0,3,0>,<4,13,0>
static proto void MatrixMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Transforms matrix.
Parameters
mat0first matrix
mat1second matrix
[out]resresult of first and second matrix multiplication

◆ MatrixNormalize()

static proto void Math3D.MatrixNormalize ( vector  mat[])
static

Normalize matrix.

◆ MatrixScale()

static proto void Math3D.MatrixScale ( vector  mat[],
float  scale 
)
static

Scale matrix.

◆ MatrixToAngles()

static proto vector Math3D.MatrixToAngles ( vector  mat[3])
static

Returns angles of rotation matrix.

vector mat[3];
Math3D.AnglesToMatrix( "70 15 45", mat );
Print( ang );
>> <70,15,45>
static proto vector MatrixToAngles(vector mat[3])
Returns angles of rotation matrix.
Parameters
matrotation matrix
Returns
yaw, pitch, roll angles in degrees

◆ MatrixToAnglesAndScale()

static proto float Math3D.MatrixToAnglesAndScale ( vector  mat[3],
out vector  angles 
)
static

Returns angles and scale of rotation matrix.

Parameters
matrotation matrix
anglesyaw, pitch, roll angles in degrees
Returns
scale of matrix

◆ MatrixToQuat()

static proto void Math3D.MatrixToQuat ( vector  mat[3],
out float  d[4] 
)
static

Converts rotation matrix to quaternion.

vector mat[3];
vector rot = "70 15 45";
float d[4];
Math3D.MatrixToQuat( mat, d );
Print( d );
>> {0.241626,0.566299,-0.118838,0.778973}
static proto void MatrixToQuat(vector mat[3], out float d[4])
Converts rotation matrix to quaternion.
Parameters
matrotation matrix
[out]dcreated quaternion copy

◆ PointLineDistance()

static proto float Math3D.PointLineDistance ( vector  point,
vector  pointOnLine,
vector  dirVector 
)
static

Calculates distance of point to a parametric line given by a point on line and direction vector.

◆ PointLineSegmentDistance()

static proto float Math3D.PointLineSegmentDistance ( vector  point,
vector  v0,
vector  v1 
)
static

Calculates distance of point to a line segment given by points v0 and v1.

◆ PointLineSegmentDistanceSqr()

static proto float Math3D.PointLineSegmentDistanceSqr ( vector  point,
vector  v0,
vector  v1 
)
static

Calculates squared distance of point to a line segment given by points v0 and v1.

◆ PolyToTriangles()

static proto int Math3D.PolyToTriangles ( vector  in[],
int  num,
out int  indices[] 
)
static

Convert polygon to triangles.

Returns
number of generated vertices

◆ QuatAngle()

static proto float Math3D.QuatAngle ( float  q1[4],
float  q2[4] 
)
static

Returns a float value equal to the angle between two quaternions.

◆ QuatConjugate()

static proto void Math3D.QuatConjugate ( out float  qout[4],
float  q[4] 
)
static

Conjugate quaternion.

◆ QuatCopy()

static proto void Math3D.QuatCopy ( float  s[4],
out float  d[4] 
)
static

Copies quaternion.

float s[4] = { 2, 3, 4, 1 };
float d[4];
Math3D.QuatCopy( s, d );
Print( d );
>> {2,3,4,1}
static proto void QuatCopy(float s[4], out float d[4])
Copies quaternion.
Parameters
squaternion to copy
[out]dcreated quaternion copy

◆ QuatDot()

static proto float Math3D.QuatDot ( float  q1[4],
float  q2[4] 
)
static

Returns a float value equal to the dot product of two quaternions.

◆ QuatIdentity()

static proto void Math3D.QuatIdentity ( out float  q[4])
static

Creates identity quaternion.

float q[4];
Print( q );
>> {0,0,0,1}
static proto void QuatIdentity(out float q[4])
Creates identity quaternion.
Parameters
[out]qcreated identity quaternion

◆ QuatInverse()

static proto void Math3D.QuatInverse ( out float  qout[4],
float  q[4] 
)
static

Inverse quaternion.

◆ QuatLength()

static proto float Math3D.QuatLength ( float  quat[4])
static

Returns the magnitude of a quaternion.

◆ QuatLerp()

static proto void Math3D.QuatLerp ( out float  qout[4],
float  q1[4],
float  q2[4],
float  frac 
)
static

Linear interpolation between q1 and q2 with weight frac (0...1).

float q1[4] = { 1, 1, 1, 1 };
float q2[4] = { 2, 2, 2, 1 };
float qout[4];
Math3D.QuatLerp( qout, q1, q2, 0.5 );
Print( qout );
>> {1.5,1.5,1.5,1}
static proto void QuatLerp(out float qout[4], float q1[4], float q2[4], float frac)
Linear interpolation between q1 and q2 with weight frac (0...1).
Parameters
[out]qoutresult quaternion
q1first quaternion
q2second quaternion
fracinterpolation weight

◆ QuatMultiply()

static proto void Math3D.QuatMultiply ( out float  qout[4],
float  q1[4],
float  q2[4] 
)
static

Multiplies quaternions.

float q1[4] = { 1, 2, 3, 1 };
float q2[4] = { 2, 2, 2, 1 };
float qout[4];
Math3D.QuatMultiply( qout, q1, q2 );
Print( qout );
>> {2,4,6,1}
static proto void QuatMultiply(out float qout[4], float q1[4], float q2[4])
Multiplies quaternions.
Parameters
[out]qoutresult quaternion
q1first quaternion
q2second quaternion

◆ QuatNorm()

static proto float Math3D.QuatNorm ( float  quat[4])
static

Returns the norm of a quaternion.

◆ QuatNormalize()

static proto float Math3D.QuatNormalize ( out float  quat[4])
static

Normalizes quaternion.

float quat[4] = {1, 1, 1, 1};
float length = QuatNormalize(quat);
Print(length);
>> {2}
Print(quat);
>> {0.5,0.5,0.5,0.5}
static proto float QuatNormalize(out float quat[4])
Normalizes quaternion.
Parameters
quatin/out quaternion
Returns
length

◆ QuatRotateTowards()

static proto void Math3D.QuatRotateTowards ( out float  qout[4],
float  q1[4],
float  q2[4],
float  maxDegreesDelta 
)
static

Returns a quaternion qout that is rotated between quaternions q1 and q2.

◆ QuatScale()

static proto void Math3D.QuatScale ( out float  qout[4],
float  scale 
)
static

Multiply each part of quaternion by scalar.

◆ QuatToAngles()

static proto vector Math3D.QuatToAngles ( float  q[4])
static

Returns Angles vector (yaw, pitch, roll) from quaternion.

◆ QuatToMatrix()

static proto void Math3D.QuatToMatrix ( float  q[4],
out vector  mat[3] 
)
static

Converts quaternion to rotation matrix.

◆ TessellateBezierSpline()

static proto void Math3D.TessellateBezierSpline ( array< vector points,
array< vector segmentPoints,
float  maxDistance,
int  maxPointsPerSegment,
array< vector outPoints 
)
static

Generates tessellation of a cubic, C0 Bezier spline.

auto points = new array<vector>();
points.Insert(Vector(0, 0, -0.5));
points.Insert(Vector(1, 0, 1.5));
auto segmentPoints = new array<vector>();
segmentPoints.Insert(Vector(1, 0, -1));
segmentPoints.Insert(Vector(1, 0, 1));
array<vector> outPoints = new array<vector>();
Math3D.TesselateBezierSpline(points, segmentPoints, 0.05, 20, outPoints);
Parameters
pointsEnd points for each segment.
segmentPointsPoints between end points.
maxDistanceMaximum distance between two consecutive generated points.
maxPointsPerSegmentMaximum number of points to generate for each segment of the spline.
outPointsPoints of the resulting rasterization. Size of the array is changed.

◆ TessellateHermiteSpline()

static proto void Math3D.TessellateHermiteSpline ( array< vector points,
array< vector tangents,
float  maxDistance,
int  maxPointsPerSegment,
array< vector outPoints 
)
static

Generates tessellation of a cubic, C0 Hermite spline.

auto points = new array<vector>();
points.Insert(Vector(0, 0, -0.5));
points.Insert(Vector(1, 0, 1.5));
auto tangents = new array<vector>();
tangents.Insert(Vector(1, 0, -1));
tangents.Insert(Vector(1, 0, 1));
array<vector> outPoints = new array<vector>();
Math3D.TesselateHermiteSpline(points, tangents, 0.05, 20, outPoints);
Parameters
pointsEnd points for each segment.
tangentsTangent vectors in respective points.
maxDistanceMaximum distance between two consecutive generated points.
maxPointsPerSegmentMaximum number of points to generate for each segment of the spline.
outPointsPoints of the resulting rasterization. Size of the array is changed.

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