Blaze team, see AUTHORS file

Mason Green (zzzzrrr)

zlib/png license

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.

class GeometricShape ;

static const int CIRCLE_SHAPE ;

static const int SEGMENT_SHAPE ;

static const int POLYGON_SHAPE ;

int shapeType ;
Used for ordering and fast type checking (can be CIRCLE_SHAPE,SEGMENT_SHAPE or POLYGON_SHAPE )

RigidBody rBody ;
The body this shape is part of

AABB aabb ;
The AABB of the shape

uint shapeID ;
Unique shape ID assigned at creation

long collisionType ;
User defined collision type for the shape.

long group ;
User defined collision group for the shape.

long layers ;
User defined layer bitmask for the shape.

Object userData ;

Number e ;
Coefficient of restitution. (elasticity)

Number maxRadius ;
Maximum Radius

Number u ;
Coefficient of friction.

Vector2D surface_v ;

GeometricShape next ;
Linked list pointer

bool fixed ;

static uint nextShapeID ;
Next shapeID static counter

this(int shapeType, Number e, Number u);

void Update ();
Update shape bounding box and world coordinates

void registerBody (RigidBody rBody);
Register body

double sortOnAABBDecending (GeometricShape a, GeometricShape b);

bool opEquals (GeometricShape a);

int opCmp (GeometricShape a);

abstract void UpdateShape (Vector2D p, Vector2D rot);

abstract bool containsPoint (Vector2D v);

abstract double CalculateInertia (double m, Vector2D offset, Object userData);

Vector2D [] getVerts ();

double getCircleRadius ();

Vector2D getCirclePosition ();

Page was generated with on Tue Feb 26 16:08:50 2008