Jeffrey T. Palmer > Box2D > Box2D::b2Shape

Download:
Box2D-0.07.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

Box2D::b2Shape - Used for collision detection.

SYNOPSIS ^

  # Don't use this class directly, use a subclass.

DESCRIPTION ^

A shape is used for collision detection. You can create a shape however you like. Shapes used for simulation in Box2D::b2World are created automatically when a Box2D::b2Fixture is created.

METHODS ^

ComputeAABB( $aabb, $xf )

Given a transform, compute the associated axis aligned bounding box for this shape.

Parameters:

Implemented in Box2D::b2CircleShape, and Box2D::b2PolygonShape.

ComputeMass( $massData, $density )

Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin.

Parameters:

Implemented in Box2D::b2CircleShape, and Box2D::b2PolygonShape.

GetType()

Get the type of this shape. You can use this to down cast to the concrete shape.

Parameters:

Returns a int

RayCast( $output, $input, $transform )

Cast a ray against this shape.

Parameters:

Returns a bool

Implemented in Box2D::b2CircleShape, and Box2D::b2PolygonShape.

TestPoint( $xf, $p )

Test a point for containment in this shape. This only works for convex shapes.

Parameters:

Returns a bool

Implemented in Box2D::b2CircleShape, and Box2D::b2PolygonShape.

m_radius()

m_radius( $m_radius )

Parameters:

Returns a float32

m_type()

m_type( $m_type )

Parameters:

Returns a int

SEE ALSO ^

BUGS ^

See "BUGS" in Box2D

AUTHORS ^

See "AUTHORS" in Box2D

COPYRIGHT & LICENSE ^

See "COPYRIGHT & LICENSE" in Box2D

syntax highlighting: