|
Drag[en]gine Script Module DragonScript 1.35
|
3D Bezier curve. More...
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. | |
3D Bezier curve.
This is a native class.
| void Dragengine.Scenery.CurveBezier3D.addPoint | ( | Vector | point | ) |
Add point with handles.
References setPointAt().
| 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().
| Vector Dragengine.Scenery.CurveBezier3D.evaluateAt | ( | int | segment, |
| float | blend ) |
Evaluate curve at segment position.
Referenced by readFromFile(), and writeToFile().
| Vector Dragengine.Scenery.CurveBezier3D.getHandle1At | ( | int | position | ) |
First handle at position.
| EInvalidParam | position is less than 0. |
| EInvalidParam | position is larger or equal to getPointCount()-1. |
References getHandle1At().
Referenced by getHandle1At().
| Vector Dragengine.Scenery.CurveBezier3D.getHandle2At | ( | int | position | ) |
Second handle at position.
| EInvalidParam | position is less than 0. |
| EInvalidParam | position is larger or equal to getPointCount()-1. |
Referenced by setPointAt().
| CurveBezierInterpolation Dragengine.Scenery.CurveBezier3D.getInterpolationMode | ( | ) |
| Vector Dragengine.Scenery.CurveBezier3D.getPointAt | ( | int | position | ) |
Point at position.
| EInvalidParam | position is less than 0. |
| EInvalidParam | position is larger or equal to getPointCount()-1. |
References getPointAt().
Referenced by getPointAt().
| int Dragengine.Scenery.CurveBezier3D.getPointCount | ( | ) |
| void Dragengine.Scenery.CurveBezier3D.insertPoint | ( | int | position, |
| Vector | point ) |
Insert point.
Set both handles to point.
| EInvalidParam | position is less than 0. |
| EInvalidParam | position is larger or equal to getPointCount(). |
References addPoint().
Referenced by removeAllPoints(), and removePointFrom().
| void Dragengine.Scenery.CurveBezier3D.insertPoint | ( | int | position, |
| Vector | point, | ||
| Vector | handle1, | ||
| Vector | handle2 ) |
Insert point with handles.
| EInvalidParam | position is less than 0. |
| EInvalidParam | position is larger or equal to getPointCount(). |
| CurveBezier3D Dragengine.Scenery.CurveBezier3D.new | ( | ) |
| CurveBezier3D Dragengine.Scenery.CurveBezier3D.new | ( | CurveBezier3D | copy | ) |
Create copy of bezier curve.
References new().
|
static |
| void Dragengine.Scenery.CurveBezier3D.removeAllPoints | ( | ) |
| void Dragengine.Scenery.CurveBezier3D.removePointFrom | ( | int | position | ) |
Remove point from the given position.
| EInvalidParam | position is less than 0. |
| EInvalidParam | position is larger or equal to getPointCount()-1. |
References insertPoint().
Referenced by getInterpolationMode().
| void Dragengine.Scenery.CurveBezier3D.setInterpolationMode | ( | CurveBezierInterpolation | mode | ) |
Set interpolation mode.
| EInvalidParam | mode is not a valid value. |
References removeAllPoints().
Referenced by evaluateAt().
| void Dragengine.Scenery.CurveBezier3D.setPointAt | ( | int | position, |
| Vector | point ) |
Set point at position.
Set both handles to point.
| EInvalidParam | position is less than 0. |
| EInvalidParam | position is larger or equal to getPointCount()-1. |
References getHandle2At().
Referenced by addPoint(), and setPointAt().
| void Dragengine.Scenery.CurveBezier3D.setPointAt | ( | int | position, |
| Vector | point, | ||
| Vector | handle1, | ||
| Vector | handle2 ) |
Set point and handles at position.
| EInvalidParam | position is less than 0. |
| EInvalidParam | position is larger or equal to getPointCount()-1. |
References setPointAt().
| void Dragengine.Scenery.CurveBezier3D.writeToFile | ( | FileWriter | writer | ) |
Write curve to file writer.
References evaluateAt(), readFromFile(), and writeToFile().
Referenced by writeToFile().