Drag[en]gine Script Module DragonScript
1.21
|
Shape list. More...
Public Member Functions | |
Constructors | |
ShapeList | new () |
Create shape list. More... | |
ShapeList | new (ShapeList copy) |
Create copy of shape list. More... | |
Management | |
int | getCount () |
Number of shapes. More... | |
bool | empty () |
Has no shapes. More... | |
bool | notEmpty () |
Has shapes. More... | |
void | removeAllShapes () |
Remove all shapes. More... | |
ShapeType | getTypeAt (int index) |
Type of shape at index. More... | |
Vector | getPositionAt (int index) |
Position of shape at index. More... | |
Quaternion | getOrientationAt (int index) |
Orientation of shape at index. More... | |
float | getRadiusAt (int index) |
Radius of shape at index. More... | |
Vector | getHalfExtendsAt (int index) |
Half extends of shape at index. More... | |
float | getHalfHeightAt (int index) |
Half height of shape at index. More... | |
float | getTopRadiusAt (int index) |
Top radius of shape at index. More... | |
float | getBottomRadiusAt (int index) |
Bottom radius of shape at index. More... | |
Vector2 | getTopAxisScalingAt (int index) |
Top axis scaling of shape at index. More... | |
Vector2 | getBottomAxisScalingAt (int index) |
Bottom axis scaling of shape at index. More... | |
int | getPointCountAt (int index) |
Count of points of shape at index. More... | |
Vector | getPointAt (int shape, int point) |
Point at index of shape at index. More... | |
Sphere | |
void | addSphere (Vector position, float radius) |
Add sphere shape. More... | |
Box | |
void | addBox (Vector center, Vector halfExtents) |
Add box shape. More... | |
void | addBox (Vector center, Vector halfExtents, Quaternion orientation) |
Add box shape. More... | |
Cylinder | |
void | addCylinder (float halfHeight, float radius) |
Add cylinder shape. More... | |
void | addCylinder (float halfHeight, float radius, Vector position) |
Add cylinder shape. More... | |
void | addCylinder (float halfHeight, float radius, Vector position, Quaternion orientation) |
Add cylinder shape. More... | |
void | addCylinder (float halfHeight, float topRadius, float bottomRadius) |
Add tapered cylinder shape. More... | |
void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector position) |
Add tapered cylinder shape. More... | |
void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector position, Quaternion orientation) |
Add tapered cylinder shape. More... | |
void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling) |
Add tapered cylinder shape. More... | |
void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling, Vector position) |
Add tapered cylinder shape. More... | |
void | addCylinder (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling, Vector position, Quaternion orientation) |
Add tapered cylinder shape. More... | |
Capsule | |
void | addCapsule (float halfHeight, float radius) |
Add a capsule shape. More... | |
void | addCapsule (float halfHeight, float radius, Vector position) |
Add a capsule shape. More... | |
void | addCapsule (float halfHeight, float radius, Vector position, Quaternion orientation) |
Add a capsule shape. More... | |
void | addCapsule (float halfHeight, float topRadius, float bottomRadius) |
Add a tapered capsule shape. More... | |
void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector position) |
Add a tapered capsule shape. More... | |
void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector position, Quaternion orientation) |
Add a tapered capsule shape. More... | |
void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling) |
Add a tapered capsule shape. More... | |
void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling, Vector position) |
Add a tapered capsule shape. More... | |
void | addCapsule (float halfHeight, float topRadius, float bottomRadius, Vector2 topAxisScaling, Vector2 bottomAxisScaling, Vector position, Quaternion orientation) |
Add a tapered capsule shape. More... | |
Hull | |
void | addHull (Array points) |
Add a hull shape. More... | |
void | addHull (Array points, Vector position) |
Add a hull shape. More... | |
void | addHull (Array points, Vector position, Quaternion orientation) |
Add a hull shape. More... | |
File Handling | |
void | writeToFile (FileWriter writer) |
Write vector to a file writer. More... | |
static ShapeList | readFromFile (FileReader reader) |
Read vector from a file reader. More... | |
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.
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.