Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ShapeList Class Reference

Shape list. More...

Inheritance diagram for Dragengine.Scenery.ShapeList:

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...
 
void addBox (Vector center, Vector halfExtents, Vector2 tapering)
 Add box shape with tapering applied at the top. More...
 
void addBox (Vector center, Vector halfExtents, Vector2 tapering, Quaternion orientation)
 Add box shape with tapering applied at the top. 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...
 

Detailed Description

Shape list.

List of analytical shapes. Supported shapes:

  • Sphere
  • Box
  • Cylinder
  • Capsule
  • Tapered box
  • Tapered cylined
  • Tapered capsule

The shape list acts as union of all shapes.

This is a native class.

Member Function Documentation

◆ addBox() [1/4]

void Dragengine.Scenery.ShapeList.addBox ( Vector  center,
Vector  halfExtents 
)

Add box shape.

◆ addBox() [2/4]

void Dragengine.Scenery.ShapeList.addBox ( Vector  center,
Vector  halfExtents,
Quaternion  orientation 
)

Add box shape.

◆ addBox() [3/4]

void Dragengine.Scenery.ShapeList.addBox ( Vector  center,
Vector  halfExtents,
Vector2  tapering 
)

Add box shape with tapering applied at the top.

◆ addBox() [4/4]

void Dragengine.Scenery.ShapeList.addBox ( Vector  center,
Vector  halfExtents,
Vector2  tapering,
Quaternion  orientation 
)

Add box shape with tapering applied at the top.

◆ addCapsule() [1/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  radius 
)

Add a capsule shape.

◆ addCapsule() [2/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  radius,
Vector  position 
)

Add a capsule shape.

◆ addCapsule() [3/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  radius,
Vector  position,
Quaternion  orientation 
)

Add a capsule shape.

◆ addCapsule() [4/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  topRadius,
float  bottomRadius 
)

Add a tapered capsule shape.

◆ addCapsule() [5/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector  position 
)

Add a tapered capsule shape.

◆ addCapsule() [6/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector  position,
Quaternion  orientation 
)

Add a tapered capsule shape.

◆ addCapsule() [7/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector2  topAxisScaling,
Vector2  bottomAxisScaling 
)

Add a tapered capsule shape.

◆ addCapsule() [8/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector2  topAxisScaling,
Vector2  bottomAxisScaling,
Vector  position 
)

Add a tapered capsule shape.

◆ addCapsule() [9/9]

void Dragengine.Scenery.ShapeList.addCapsule ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector2  topAxisScaling,
Vector2  bottomAxisScaling,
Vector  position,
Quaternion  orientation 
)

Add a tapered capsule shape.

◆ addCylinder() [1/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  radius 
)

Add cylinder shape.

◆ addCylinder() [2/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  radius,
Vector  position 
)

Add cylinder shape.

◆ addCylinder() [3/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  radius,
Vector  position,
Quaternion  orientation 
)

Add cylinder shape.

◆ addCylinder() [4/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  topRadius,
float  bottomRadius 
)

Add tapered cylinder shape.

◆ addCylinder() [5/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector  position 
)

Add tapered cylinder shape.

◆ addCylinder() [6/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector  position,
Quaternion  orientation 
)

Add tapered cylinder shape.

◆ addCylinder() [7/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector2  topAxisScaling,
Vector2  bottomAxisScaling 
)

Add tapered cylinder shape.

◆ addCylinder() [8/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector2  topAxisScaling,
Vector2  bottomAxisScaling,
Vector  position 
)

Add tapered cylinder shape.

◆ addCylinder() [9/9]

void Dragengine.Scenery.ShapeList.addCylinder ( float  halfHeight,
float  topRadius,
float  bottomRadius,
Vector2  topAxisScaling,
Vector2  bottomAxisScaling,
Vector  position,
Quaternion  orientation 
)

Add tapered cylinder shape.

◆ addHull() [1/3]

void Dragengine.Scenery.ShapeList.addHull ( Array  points)

Add a hull shape.

Parameters
pointsArray of Vector.

◆ addHull() [2/3]

void Dragengine.Scenery.ShapeList.addHull ( Array  points,
Vector  position 
)

Add a hull shape.

Parameters
pointsArray of Vector.

◆ addHull() [3/3]

void Dragengine.Scenery.ShapeList.addHull ( Array  points,
Vector  position,
Quaternion  orientation 
)

Add a hull shape.

Parameters
pointsArray of Vector.

◆ addSphere()

void Dragengine.Scenery.ShapeList.addSphere ( Vector  position,
float  radius 
)

Add sphere shape.

◆ empty()

bool Dragengine.Scenery.ShapeList.empty ( )

Has no shapes.

◆ getBottomAxisScalingAt()

Vector2 Dragengine.Scenery.ShapeList.getBottomAxisScalingAt ( int  index)

Bottom axis scaling of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().
EInvalidParamShape is not of type ShapeType.cylinder or ShapeType.capsule .

◆ getBottomRadiusAt()

float Dragengine.Scenery.ShapeList.getBottomRadiusAt ( int  index)

Bottom radius of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().
EInvalidParamShape is not of type ShapeType.cylinder or ShapeType.capsule .

◆ getCount()

int Dragengine.Scenery.ShapeList.getCount ( )

Number of shapes.

◆ getHalfExtendsAt()

Vector Dragengine.Scenery.ShapeList.getHalfExtendsAt ( int  index)

Half extends of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().
EInvalidParamShape is not of type ShapeType.box .

◆ getHalfHeightAt()

float Dragengine.Scenery.ShapeList.getHalfHeightAt ( int  index)

Half height of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().
EInvalidParamShape is not of type ShapeType.cylinder or ShapeType.capsule .

◆ getOrientationAt()

Quaternion Dragengine.Scenery.ShapeList.getOrientationAt ( int  index)

Orientation of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().

◆ getPointAt()

Vector Dragengine.Scenery.ShapeList.getPointAt ( int  shape,
int  point 
)

Point at index of shape at index.

Exceptions
EInvalidParamshape is less than 0 or grater than or equal to getCount().
EInvalidParampoint is less than 0 or grater than or equal to getPointCountAt(shape).
EInvalidParamShape is not of type ShapeType.hull .

◆ getPointCountAt()

int Dragengine.Scenery.ShapeList.getPointCountAt ( int  index)

Count of points of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().
EInvalidParamShape is not of type ShapeType.hull .

◆ getPositionAt()

Vector Dragengine.Scenery.ShapeList.getPositionAt ( int  index)

Position of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().

◆ getRadiusAt()

float Dragengine.Scenery.ShapeList.getRadiusAt ( int  index)

Radius of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().
EInvalidParamShape is not of type ShapeType.sphere .

◆ getTopAxisScalingAt()

Vector2 Dragengine.Scenery.ShapeList.getTopAxisScalingAt ( int  index)

Top axis scaling of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().
EInvalidParamShape is not of type ShapeType.cylinder or ShapeType.capsule .

◆ getTopRadiusAt()

float Dragengine.Scenery.ShapeList.getTopRadiusAt ( int  index)

Top radius of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().
EInvalidParamShape is not of type ShapeType.cylinder or ShapeType.capsule .

◆ getTypeAt()

ShapeType Dragengine.Scenery.ShapeList.getTypeAt ( int  index)

Type of shape at index.

Exceptions
EInvalidParamindex is less than 0 or grater than or equal to getCount().

◆ new() [1/2]

ShapeList Dragengine.Scenery.ShapeList.new ( )

Create shape list.

◆ new() [2/2]

ShapeList Dragengine.Scenery.ShapeList.new ( ShapeList  copy)

Create copy of shape list.

◆ notEmpty()

bool Dragengine.Scenery.ShapeList.notEmpty ( )

Has shapes.

◆ readFromFile()

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

Read vector from a file reader.

◆ removeAllShapes()

void Dragengine.Scenery.ShapeList.removeAllShapes ( )

Remove all shapes.

◆ writeToFile()

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

Write vector to a file writer.


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