Bowls
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Box Class Reference

Class that represents a Box. More...

#include <Box.h>

Inheritance diagram for Box:
Inheritance graph
Collaboration diagram for Box:
Collaboration graph

Public Member Functions

 Box (cgg::Mat43, bool)
 
 Box (cgg::Mat43, cgg::Vec3, cgg::Vec3, bool)
 
 Box (cgg::Mat43, cgg::Vec3, float, float, float, bool)
 
 Box (cgg::Vec3, bool)
 
 Box (cgg::Vec3, cgg::Vec3, cgg::Vec3, bool)
 
 Box (cgg::Vec3, cgg::Vec3, float, float, float, bool)
 
void render (gl::Primitives *)
 
float getWidth ()
 
float getDepth ()
 
float getHeight ()
 
bool xAxisCheck ()
 
- Public Member Functions inherited from CollisionEntity
 CollisionEntity (cgg::Mat43)
 
 CollisionEntity (cgg::Mat43, cgg::Vec3)
 
 CollisionEntity (cgg::Vec3)
 
 CollisionEntity (cgg::Vec3, cgg::Vec3)
 
void updateXVelocity (float)
 
void updateYVelocity (float)
 
void updateZVelocity (float)
 
float getXVelocity ()
 
float getYVelocity ()
 
float getZVelocity ()
 
- Public Member Functions inherited from Entity
 Entity (cgg::Mat43)
 
 Entity (cgg::Mat43, cgg::Vec3)
 
 Entity (cgg::Vec3)
 
 Entity (cgg::Vec3, cgg::Vec3)
 
void changePosition (cgg::Vec3)
 
void updatePosition (cgg::Vec3)
 
cgg::Vec3 getPosition ()
 
void updateColour (cgg::Vec3)
 

Protected Attributes

cgg::Vec3 dimensions
 Contains the Width, Height and Depth of the Box. More...
 
bool xAxis
 if it is a box on the x axis (for a wall) - TEMP for easy wall collision physics More...
 
- Protected Attributes inherited from Entity
cgg::Mat43 transform
 cgg::Mat43 containing a transform (position,rotation,scale). More...
 
cgg::Vec3 colour
 cgg::Vec3 containing a colour's r,g,b values. More...
 

Detailed Description

Class that represents a Box.

Class that contains a Box and its interactions with the game.

Definition at line 13 of file Box.h.

Constructor & Destructor Documentation

Box::Box ( cgg::Mat43  ,
bool   
)

BROKEN - Create a Box object

BROKEN - Creates a Box object using the passed in transform.

Todo:
Find a way to copy the transform into the dimension Vec3 otherwise this crashes.
Parameters
cgg::Mat43The transformation matrix
boolif on the x axis
Box::Box ( cgg::Mat43  ,
cgg::Vec3  ,
cgg::Vec3  ,
bool   
)

Create a Box object

Creates a Box object using the passed in transform, colour and dimensions.

Parameters
cgg::Mat43- The transformation matrix
cgg::Vec3- Contains the colour r,g,b values
cgg::Vec3- Dimensions contains the width, height and depth (In that order)
boolif on the x axis
Box::Box ( cgg::Mat43  ,
cgg::Vec3  ,
float  ,
float  ,
float  ,
bool   
)

Create a Box object

Creates a Box object using the passed in transform, colour and individual dimensions.

Parameters
cgg::Mat43- The transformation matrix
cgg::Vec3- Contains the colour r,g,b values
float- Width of the Box
float- Height of the Box
float- Depth of the Box
boolif on the x axis
Box::Box ( cgg::Vec3  ,
bool   
)

BROKEN - Create a Box object

BROKEN - Creates a Box object using the passed in transform.

Todo:
Find a way to copy the transform into the dimension Vec3 otherwise this crashes.
Parameters
cgg::Vec3- Position
boolif on the x axis
Box::Box ( cgg::Vec3  ,
cgg::Vec3  ,
cgg::Vec3  ,
bool   
)

Create a Box object

Creates a Box object using the passed in transform, colour and dimensions.

Parameters
cgg::Vec3- Position
cgg::Vec3- Contains the colour r,g,b values
cgg::Vec3- Dimensions contains the width, height and depth (In that order)
boolif on the x axis
Box::Box ( cgg::Vec3  ,
cgg::Vec3  ,
float  ,
float  ,
float  ,
bool   
)

Create a Box object

Creates a Box object using the passed in transform, colour and individual dimensions.

Parameters
cgg::Vec3- Position
cgg::Vec3- Contains the colour r,g,b values
float- Width of the Box
float- Height of the Box
float- Depth of the Box
boolif on the x axis

Member Function Documentation

float Box::getDepth ( )

Returns the depth of the Box

Returns
float the depth
float Box::getHeight ( )

Returns the height of the Box

Returns
float the height
float Box::getWidth ( )

Returns the width of the Box

Returns
float the width
void Box::render ( gl::Primitives *  )
virtual

Renders a box

Creates a box using the objects internal values and passes it into primitiveList.

Parameters
gl::Primitives*- Pointer to a list of primitives

Implements Entity.

bool Box::xAxisCheck ( )

Returns the if the axis is x or y, if x then true

Returns
bool the x axis boolean

Member Data Documentation

cgg::Vec3 Box::dimensions
protected

Contains the Width, Height and Depth of the Box.

Definition at line 131 of file Box.h.

bool Box::xAxis
protected

if it is a box on the x axis (for a wall) - TEMP for easy wall collision physics

Definition at line 133 of file Box.h.


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