Public Member Functions | Protected Attributes

RectangleCollider Class Reference

Rectangle collider class. More...

#include <RectangleCollider.h>

List of all members.

Public Member Functions

 RectangleCollider ()
 RectangleCollider (CIwFVec2 position, CIwFVec2 dimensions)
 ~RectangleCollider ()
float GetLeft ()
float GetRight ()
float GetCentre ()
float GetTop ()
float GetWidth ()

Protected Attributes

CIwFVec2 m_position
 Position of collider.
CIwFVec2 m_dimensions
 Collider dimensions (in pixels).

Detailed Description

Rectangle collider class.

Rectangular physics object for use inside the grid to separate columns.


Constructor & Destructor Documentation

RectangleCollider::RectangleCollider (  )  [inline]

Default constructor.

Create a new rectangle collider.

RectangleCollider::RectangleCollider ( CIwFVec2  position,
CIwFVec2  dimensions 
)

Constructor.

Create a new rectangle collider.

Parameters:
[in] position Position of the collider.
[in] dimensions Pixel dimensions of the collider.
RectangleCollider::~RectangleCollider (  )  [inline]

Destructor.

Destroy the collider.


Member Function Documentation

float RectangleCollider::GetCentre (  ) 

Get centre.

Get the x position of the centre of the collider.

Returns:
float position.
float RectangleCollider::GetLeft (  ) 

Get left.

Get the x position of the left hand side of the collider.

Returns:
float position.
float RectangleCollider::GetRight (  ) 

Get right.

Get the x position of the right hand side of the collider.

Returns:
float position.
float RectangleCollider::GetTop (  ) 

Get top.

Get the y position of the top of the collider.

Returns:
float position.
float RectangleCollider::GetWidth (  ) 

Get width.

Get the width of the collider.

Returns:
float width.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations