Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.CurveBezier3D Class Reference

3D Bezier curve. More...

Inheritance diagram for Dragengine.Scenery.CurveBezier3D:

Public Member Functions

Constructors
CurveBezier3D new ()
 Create bezier curve.
CurveBezier3D new (CurveBezier3D copy)
 Create copy of bezier curve.
Management
int getPointCount ()
 Number of points.
Vector getPointAt (int position)
 Point at position.
Vector getHandle1At (int position)
 First handle at position.
Vector getHandle2At (int position)
 Second handle at position.
void setPointAt (int position, Vector point)
 Set point at position.
void setPointAt (int position, Vector point, Vector handle1, Vector handle2)
 Set point and handles at position.
void addPoint (Vector point)
 Add point.
void addPoint (Vector point, Vector handle1, Vector handle2)
 Add point with handles.
void insertPoint (int position, Vector point)
 Insert point.
void insertPoint (int position, Vector point, Vector handle1, Vector handle2)
 Insert point with handles.
void removePointFrom (int position)
 Remove point from the given position.
void removeAllPoints ()
 Remove all points.
CurveBezierInterpolation getInterpolationMode ()
 Interpolation mode.
void setInterpolationMode (CurveBezierInterpolation mode)
 Set interpolation mode.
Vector evaluateAt (int segment, float blend)
 Evaluate curve at segment position.
Vector evaluateAt (float curveValue)
 Evaluate curve using curve value.

File Handling

void writeToFile (FileWriter writer)
 Write curve to file writer.
static CurveBezier3D readFromFile (FileReader reader)
 Read curve from file reader.

Detailed Description

3D Bezier curve.

This is a native class.

Member Function Documentation

◆ addPoint() [1/2]

void Dragengine.Scenery.CurveBezier3D.addPoint ( Vector point)

Add point.

Set both handles to point.

Referenced by insertPoint().

◆ addPoint() [2/2]

void Dragengine.Scenery.CurveBezier3D.addPoint ( Vector point,
Vector handle1,
Vector handle2 )

Add point with handles.

References setPointAt().

◆ evaluateAt() [1/2]

Vector Dragengine.Scenery.CurveBezier3D.evaluateAt ( float curveValue)

Evaluate curve using curve value.

Curve value composes of segment as integral part and blend factor as fractional part.

References getInterpolationMode(), and setInterpolationMode().

◆ evaluateAt() [2/2]

Vector Dragengine.Scenery.CurveBezier3D.evaluateAt ( int segment,
float blend )

Evaluate curve at segment position.

Referenced by readFromFile(), and writeToFile().

◆ getHandle1At()

Vector Dragengine.Scenery.CurveBezier3D.getHandle1At ( int position)

First handle at position.

Exceptions
EInvalidParamposition is less than 0.
EInvalidParamposition is larger or equal to getPointCount()-1.

References getHandle1At().

Referenced by getHandle1At().

◆ getHandle2At()

Vector Dragengine.Scenery.CurveBezier3D.getHandle2At ( int position)

Second handle at position.

Exceptions
EInvalidParamposition is less than 0.
EInvalidParamposition is larger or equal to getPointCount()-1.

Referenced by setPointAt().

◆ getInterpolationMode()

CurveBezierInterpolation Dragengine.Scenery.CurveBezier3D.getInterpolationMode ( )

Interpolation mode.

Version
1.26

References removePointFrom().

Referenced by evaluateAt().

◆ getPointAt()

Vector Dragengine.Scenery.CurveBezier3D.getPointAt ( int position)

Point at position.

Exceptions
EInvalidParamposition is less than 0.
EInvalidParamposition is larger or equal to getPointCount()-1.

References getPointAt().

Referenced by getPointAt().

◆ getPointCount()

int Dragengine.Scenery.CurveBezier3D.getPointCount ( )

Number of points.

References getPointCount().

Referenced by getPointCount().

◆ insertPoint() [1/2]

void Dragengine.Scenery.CurveBezier3D.insertPoint ( int position,
Vector point )

Insert point.

Set both handles to point.

Exceptions
EInvalidParamposition is less than 0.
EInvalidParamposition is larger or equal to getPointCount().

References addPoint().

Referenced by removeAllPoints(), and removePointFrom().

◆ insertPoint() [2/2]

void Dragengine.Scenery.CurveBezier3D.insertPoint ( int position,
Vector point,
Vector handle1,
Vector handle2 )

Insert point with handles.

Exceptions
EInvalidParamposition is less than 0.
EInvalidParamposition is larger or equal to getPointCount().

◆ new() [1/2]

CurveBezier3D Dragengine.Scenery.CurveBezier3D.new ( )

Create bezier curve.

References new().

Referenced by new(), and new().

◆ new() [2/2]

CurveBezier3D Dragengine.Scenery.CurveBezier3D.new ( CurveBezier3D copy)

Create copy of bezier curve.

References new().

◆ readFromFile()

CurveBezier3D Dragengine.Scenery.CurveBezier3D.readFromFile ( FileReader reader)
static

Read curve from file reader.

Version
1.26

References evaluateAt().

Referenced by writeToFile().

◆ removeAllPoints()

void Dragengine.Scenery.CurveBezier3D.removeAllPoints ( )

Remove all points.

References insertPoint().

Referenced by setInterpolationMode().

◆ removePointFrom()

void Dragengine.Scenery.CurveBezier3D.removePointFrom ( int position)

Remove point from the given position.

Exceptions
EInvalidParamposition is less than 0.
EInvalidParamposition is larger or equal to getPointCount()-1.

References insertPoint().

Referenced by getInterpolationMode().

◆ setInterpolationMode()

void Dragengine.Scenery.CurveBezier3D.setInterpolationMode ( CurveBezierInterpolation mode)

Set interpolation mode.

Version
1.26
Exceptions
EInvalidParammode is not a valid value.

References removeAllPoints().

Referenced by evaluateAt().

◆ setPointAt() [1/2]

void Dragengine.Scenery.CurveBezier3D.setPointAt ( int position,
Vector point )

Set point at position.

Set both handles to point.

Exceptions
EInvalidParamposition is less than 0.
EInvalidParamposition is larger or equal to getPointCount()-1.

References getHandle2At().

Referenced by addPoint(), and setPointAt().

◆ setPointAt() [2/2]

void Dragengine.Scenery.CurveBezier3D.setPointAt ( int position,
Vector point,
Vector handle1,
Vector handle2 )

Set point and handles at position.

Exceptions
EInvalidParamposition is less than 0.
EInvalidParamposition is larger or equal to getPointCount()-1.

References setPointAt().

◆ writeToFile()

void Dragengine.Scenery.CurveBezier3D.writeToFile ( FileWriter writer)

Write curve to file writer.

Version
1.26

References evaluateAt(), readFromFile(), and writeToFile().

Referenced by writeToFile().


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