|
Drag[en]gine Script Module DragonScript 1.32.1
|
Shape list. More...
Public Member Functions | |
Constructors | |
| ShapeList | new () |
| Create shape list. | |
| ShapeList | new (ShapeList copy) |
| Create copy of shape list. | |
Management | |
| int | getCount () |
| Number of shapes. | |
| bool | empty () |
| Has no shapes. | |
| bool | notEmpty () |
| Has shapes. | |
| void | removeAllShapes () |
| Remove all shapes. | |
| ShapeType | getTypeAt (int index) |
| Type of shape at index. | |
| Vector | getPositionAt (int index) |
| Position of shape at index. | |
| Quaternion | getOrientationAt (int index) |
| Orientation of shape at index. | |
| float | getRadiusAt (int index) |
| Radius of shape at index. | |
| Vector | getHalfExtendsAt (int index) |
| Half extends of shape at index. | |
| float | getHalfHeightAt (int index) |
| Half height of shape at index. | |
| float | getTopRadiusAt (int index) |
| Top radius of shape at index. | |
| float | getBottomRadiusAt (int index) |
| Bottom radius of shape at index. | |
| Vector2 | getTopAxisScalingAt (int index) |
| Top axis scaling of shape at index. | |
| Vector2 | getBottomAxisScalingAt (int index) |
| Bottom axis scaling of shape at index. | |
| int | getPointCountAt (int index) |
| Count of points of shape at index. | |
| Vector | getPointAt (int shape, int point) |
| Point at index of shape at index. | |
Sphere | |
| void | addSphere (Vector position, float radius) |
| Add sphere shape. | |
Box | |
| void | addBox (Vector center, Vector halfExtents) |
| Add box shape. | |
| void | addBox (Vector center, Vector halfExtents, Quaternion orientation) |
| Add box shape. | |
| void | addBox (Vector center, Vector halfExtents, Vector2 tapering) |
| Add box shape with tapering applied at the top. | |
| void | addBox (Vector center, Vector halfExtents, Vector2 tapering, Quaternion orientation) |
| Add box shape with tapering applied at the top. | |
Cylinder | |
| void | addCylinder (float halfHeight, float radius) |
| Add cylinder shape. | |
| void | addCylinder (float halfHeight, float radius, Vector position) |
| Add cylinder shape. | |
| void | addCylinder (float halfHeight, float radius, Vector position, Quaternion orientation) |
| Add cylinder shape. | |
| void | addCylinder (float halfHeight, float topRadius, float bottomRadius) |
| Add tapered cylinder shape. | |
| void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector position) |
| Add tapered cylinder shape. | |
| void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector position, Quaternion orientation) |
| Add tapered cylinder shape. | |
| void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling) |
| Add tapered cylinder shape. | |
| void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling, Vector position) |
| Add tapered cylinder shape. | |
| void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling, Vector position, Quaternion orientation) |
| Add tapered cylinder shape. | |
Capsule | |
| void | addCapsule (float halfHeight, float radius) |
| Add a capsule shape. | |
| void | addCapsule (float halfHeight, float radius, Vector position) |
| Add a capsule shape. | |
| void | addCapsule (float halfHeight, float radius, Vector position, Quaternion orientation) |
| Add a capsule shape. | |
| void | addCapsule (float halfHeight, float topRadius, float bottomRadius) |
| Add a tapered capsule shape. | |
| void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector position) |
| Add a tapered capsule shape. | |
| void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector position, Quaternion orientation) |
| Add a tapered capsule shape. | |
| void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling) |
| Add a tapered capsule shape. | |
| void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling, Vector position) |
| Add a tapered capsule shape. | |
| void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling, Vector position, Quaternion orientation) |
| Add a tapered capsule shape. | |
Hull | |
| void | addHull (Array points) |
| Add a hull shape. | |
| void | addHull (Array points, Vector position) |
| Add a hull shape. | |
| void | addHull (Array points, Vector position, Quaternion orientation) |
| Add a hull shape. | |
File Handling | |
| void | writeToFile (FileWriter writer) |
| Write vector to a file writer. | |
| static ShapeList | readFromFile (FileReader reader) |
| Read vector from a file reader. | |
Shape list.
List of analytical shapes. Supported shapes:
The shape list acts as union of all shapes.
This is a native class.
| void Dragengine.Scenery.ShapeList.addBox | ( | Vector | center, |
| Vector | halfExtents, | ||
| Quaternion | orientation | ||
| ) |
Add box shape.
Add box shape with tapering applied at the top.
| void Dragengine.Scenery.ShapeList.addBox | ( | Vector | center, |
| Vector | halfExtents, | ||
| Vector2 | tapering, | ||
| Quaternion | orientation | ||
| ) |
Add box shape with tapering applied at the top.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | radius | ||
| ) |
Add a capsule shape.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | radius, | ||
| Vector | position | ||
| ) |
Add a capsule shape.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | radius, | ||
| Vector | position, | ||
| Quaternion | orientation | ||
| ) |
Add a capsule shape.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius | ||
| ) |
Add a tapered capsule shape.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector | position | ||
| ) |
Add a tapered capsule shape.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector | position, | ||
| Quaternion | orientation | ||
| ) |
Add a tapered capsule shape.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector2 | topAxisScaling, | ||
| Vector2 | bottomAxisScaling | ||
| ) |
Add a tapered capsule shape.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector2 | topAxisScaling, | ||
| Vector2 | bottomAxisScaling, | ||
| Vector | position | ||
| ) |
Add a tapered capsule shape.
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector2 | topAxisScaling, | ||
| Vector2 | bottomAxisScaling, | ||
| Vector | position, | ||
| Quaternion | orientation | ||
| ) |
Add a tapered capsule shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | radius | ||
| ) |
Add cylinder shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | radius, | ||
| Vector | position | ||
| ) |
Add cylinder shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | radius, | ||
| Vector | position, | ||
| Quaternion | orientation | ||
| ) |
Add cylinder shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius | ||
| ) |
Add tapered cylinder shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector | position | ||
| ) |
Add tapered cylinder shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector | position, | ||
| Quaternion | orientation | ||
| ) |
Add tapered cylinder shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector2 | topAxisScaling, | ||
| Vector2 | bottomAxisScaling | ||
| ) |
Add tapered cylinder shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector2 | topAxisScaling, | ||
| Vector2 | bottomAxisScaling, | ||
| Vector | position | ||
| ) |
Add tapered cylinder shape.
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector2 | topAxisScaling, | ||
| Vector2 | bottomAxisScaling, | ||
| Vector | position, | ||
| Quaternion | orientation | ||
| ) |
Add tapered cylinder shape.
| void Dragengine.Scenery.ShapeList.addHull | ( | Array | points | ) |
Add a hull shape.
| points | Array of Vector. |
| void Dragengine.Scenery.ShapeList.addHull | ( | Array | points, |
| Vector | position | ||
| ) |
Add a hull shape.
| points | Array of Vector. |
| void Dragengine.Scenery.ShapeList.addHull | ( | Array | points, |
| Vector | position, | ||
| Quaternion | orientation | ||
| ) |
Add a hull shape.
| points | Array of Vector. |
| void Dragengine.Scenery.ShapeList.addSphere | ( | Vector | position, |
| float | radius | ||
| ) |
Add sphere shape.
| bool Dragengine.Scenery.ShapeList.empty | ( | ) |
Has no shapes.
| Vector2 Dragengine.Scenery.ShapeList.getBottomAxisScalingAt | ( | int | index | ) |
Bottom axis scaling of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | Shape is not of type ShapeType.cylinder or ShapeType.capsule . |
| float Dragengine.Scenery.ShapeList.getBottomRadiusAt | ( | int | index | ) |
Bottom radius of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | Shape is not of type ShapeType.cylinder or ShapeType.capsule . |
| int Dragengine.Scenery.ShapeList.getCount | ( | ) |
Number of shapes.
| Vector Dragengine.Scenery.ShapeList.getHalfExtendsAt | ( | int | index | ) |
Half extends of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | Shape is not of type ShapeType.box . |
| float Dragengine.Scenery.ShapeList.getHalfHeightAt | ( | int | index | ) |
Half height of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | Shape is not of type ShapeType.cylinder or ShapeType.capsule . |
| Quaternion Dragengine.Scenery.ShapeList.getOrientationAt | ( | int | index | ) |
Orientation of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| Vector Dragengine.Scenery.ShapeList.getPointAt | ( | int | shape, |
| int | point | ||
| ) |
Point at index of shape at index.
| EInvalidParam | shape is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | point is less than 0 or grater than or equal to getPointCountAt(shape). |
| EInvalidParam | Shape is not of type ShapeType.hull . |
| int Dragengine.Scenery.ShapeList.getPointCountAt | ( | int | index | ) |
Count of points of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | Shape is not of type ShapeType.hull . |
| Vector Dragengine.Scenery.ShapeList.getPositionAt | ( | int | index | ) |
Position of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| float Dragengine.Scenery.ShapeList.getRadiusAt | ( | int | index | ) |
Radius of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | Shape is not of type ShapeType.sphere . |
| Vector2 Dragengine.Scenery.ShapeList.getTopAxisScalingAt | ( | int | index | ) |
Top axis scaling of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | Shape is not of type ShapeType.cylinder or ShapeType.capsule . |
| float Dragengine.Scenery.ShapeList.getTopRadiusAt | ( | int | index | ) |
Top radius of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| EInvalidParam | Shape is not of type ShapeType.cylinder or ShapeType.capsule . |
| ShapeType Dragengine.Scenery.ShapeList.getTypeAt | ( | int | index | ) |
Type of shape at index.
| EInvalidParam | index is less than 0 or grater than or equal to getCount(). |
| ShapeList Dragengine.Scenery.ShapeList.new | ( | ) |
Create shape list.
| bool Dragengine.Scenery.ShapeList.notEmpty | ( | ) |
Has shapes.
|
static |
Read vector from a file reader.
| void Dragengine.Scenery.ShapeList.removeAllShapes | ( | ) |
Remove all shapes.
| void Dragengine.Scenery.ShapeList.writeToFile | ( | FileWriter | writer | ) |
Write vector to a file writer.