PhysicsShape Class Reference

Represents a single physics shape used for collision detections. More...

#include <Physics/PhysicsShape.h>

List of all members.

Classes

struct  PhysicsShapeData
 Holds all of the data needed to fully descibe a PhysicsShape. More...

Public Types

enum  PhysicsShapeType {
  PSHAPE_UNKNOWN = -1, PSHAPE_CIRCLE = 0, PSHAPE_BOX, PSHAPE_POLY,
  PSHAPE_COUNT
}
 

Defines the differant shape types allowed by the PhysicsShape class.

More...

Public Member Functions

 PhysicsShape ()
 Constructor.
 ~PhysicsShape ()
 Deconstructor.
void SetCollisionGroups (CollisionGroup belongsTo, CollisionGroup collidesWith)
 Sets the collision groups that the shape will belong to and will collide with.
void MultiplyTransform (const Matrixf &m)
 Transforms the shape by the given Matrix.
AABB GetBoundingBox () const
 Computes the bounding box for the shaped.
PhysicsObject * GetOwner () const
 Gets the PhysicsObject associated with this shape.

Protected Member Functions

void SetCollisionFilters ()
 Sets the collison filters used by Box2D.

Detailed Description

Represents a single physics shape used for collision detections.


Member Enumeration Documentation

Defines the differant shape types allowed by the PhysicsShape class.

Enumerator:
PSHAPE_UNKNOWN 

The shape type is not defined.

PSHAPE_CIRCLE 

Circle shape.

PSHAPE_BOX 

Rectangular box shape.

PSHAPE_POLY 

Arbitrary polygon shape.

PSHAPE_COUNT 

The number of allowable shape types.


Member Function Documentation

AABB PhysicsShape::GetBoundingBox (  )  const

Computes the bounding box for the shaped.

Returns:
An axis aligned bounding box containting the shape.
PhysicsObject * PhysicsShape::GetOwner (  )  const

Gets the PhysicsObject associated with this shape.

Returns:
A pointer to the physics object that owns this object or NULL if no such object exists.
void PhysicsShape::MultiplyTransform ( const Matrixf m  ) 

Transforms the shape by the given Matrix.

Parameters:
[in] m the Matrix to transform the shape by.
void PhysicsShape::SetCollisionGroups ( CollisionGroup  belongsTo,
CollisionGroup  collidesWith 
)

Sets the collision groups that the shape will belong to and will collide with.

Parameters:
[in] belongsTo the groups that the shape belongs to.
[in] collidesWith the groups that the shaoe collides with.

The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:06 2010 for BrickOut |ReDuX| by  doxygen 1.6.3