|
Drag[en]gine Script Module DragonScript 1.35
|
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. | |
| Vector2 | getAxisScalingAt (int index) |
| Axis scaling of shape at index. | |
| Vector | getHalfExtendsAt (int index) |
| Half extends of shape at index. | |
| Vector2 | getTaperingAt (int index) |
| Tapering 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. | |
| void | addSphere (Vector position, float radius, Vector2 axisScaling) |
| Add ellipsoid shape. | |
| void | addSphere (Vector position, float radius, Vector2 axisScaling, Quaternion orientation) |
| Add ellipsoid 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.
Add box shape.
Referenced by addCapsule(), addCylinder(), and addCylinder().
| void Dragengine.Scenery.ShapeList.addBox | ( | Vector | center, |
| Vector | halfExtents, | ||
| Quaternion | orientation ) |
Add box shape.
References getPointCountAt().
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.
References getPointAt().
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | radius ) |
Add a capsule shape.
Referenced by addHull(), readFromFile(), and writeToFile().
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | radius, | ||
| Vector | position ) |
Add a capsule shape.
References addBox().
| 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.
References addCylinder().
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector | position, | ||
| Quaternion | orientation ) |
Add a tapered capsule shape.
References addCylinder().
| void Dragengine.Scenery.ShapeList.addCapsule | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector2 | topAxisScaling, | ||
| Vector2 | bottomAxisScaling ) |
Add a tapered capsule shape.
References addCylinder().
| 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.
References addCylinder().
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | radius ) |
Add cylinder shape.
Referenced by addCapsule(), addCapsule(), addCapsule(), addCapsule(), addHull(), and addHull().
| 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.
References addSphere().
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius ) |
Add tapered cylinder shape.
References addSphere().
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector | position ) |
Add tapered cylinder shape.
References addSphere().
| 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.
References addBox().
| void Dragengine.Scenery.ShapeList.addCylinder | ( | float | halfHeight, |
| float | topRadius, | ||
| float | bottomRadius, | ||
| Vector2 | topAxisScaling, | ||
| Vector2 | bottomAxisScaling, | ||
| Vector | position, | ||
| Quaternion | orientation ) |
Add tapered cylinder shape.
References addBox().
| void Dragengine.Scenery.ShapeList.addHull | ( | Array | points | ) |
Add a hull shape.
| points | Array of Vector. |
References addCylinder().
Referenced by writeToFile().
| void Dragengine.Scenery.ShapeList.addHull | ( | Array | points, |
| Vector | position ) |
| void Dragengine.Scenery.ShapeList.addHull | ( | Array | points, |
| Vector | position, | ||
| Quaternion | orientation ) |
| void Dragengine.Scenery.ShapeList.addSphere | ( | Vector | position, |
| float | radius ) |
Add sphere shape.
Referenced by addCylinder(), addCylinder(), and addCylinder().
Add ellipsoid shape.
| void Dragengine.Scenery.ShapeList.addSphere | ( | Vector | position, |
| float | radius, | ||
| Vector2 | axisScaling, | ||
| Quaternion | orientation ) |
Add ellipsoid shape.
References getBottomAxisScalingAt().
| bool Dragengine.Scenery.ShapeList.empty | ( | ) |
Has no shapes.
Referenced by notEmpty().
| Vector2 Dragengine.Scenery.ShapeList.getAxisScalingAt | ( | int | index | ) |
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.sphere . |
Referenced by getTaperingAt().
| 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 . |
References getTopRadiusAt().
Referenced by addSphere().
| 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 . |
References getTaperingAt().
Referenced by getPointCountAt().
| int Dragengine.Scenery.ShapeList.getCount | ( | ) |
| 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 . |
References getRadiusAt().
Referenced by getHalfHeightAt().
| 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 . |
References getHalfExtendsAt().
Referenced by getTopAxisScalingAt().
| 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(). |
References getPositionAt().
Referenced by getRadiusAt().
| 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 . |
References getTopAxisScalingAt().
Referenced by addBox().
| 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 . |
References getBottomRadiusAt().
Referenced by addBox().
| 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(). |
References getTypeAt().
Referenced by getOrientationAt().
| 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 . |
References getOrientationAt().
Referenced by getHalfExtendsAt().
| Vector2 Dragengine.Scenery.ShapeList.getTaperingAt | ( | int | index | ) |
Tapering 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 . |
References getAxisScalingAt().
Referenced by getBottomRadiusAt().
| 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 . |
References getHalfHeightAt().
Referenced by getPointAt().
| 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 . |
Referenced by getBottomAxisScalingAt().
| 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(). |
References removeAllShapes().
Referenced by getPositionAt().
| ShapeList Dragengine.Scenery.ShapeList.new | ( | ) |
Create copy of shape list.
References new().
| bool Dragengine.Scenery.ShapeList.notEmpty | ( | ) |
|
static |
| void Dragengine.Scenery.ShapeList.removeAllShapes | ( | ) |
| void Dragengine.Scenery.ShapeList.writeToFile | ( | FileWriter | writer | ) |
Write vector to a file writer.
References addCapsule(), addHull(), readFromFile(), and writeToFile().
Referenced by writeToFile().