Bowls
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Entity Class Referenceabstract

Class that represents an Entity. More...

#include <Entity.h>

Inheritance diagram for Entity:
Inheritance graph
Collaboration diagram for Entity:
Collaboration graph

Public Member Functions

 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 ()
 
virtual void render (gl::Primitives *)=0
 
void updateColour (cgg::Vec3)
 

Protected Attributes

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 an Entity.

Class that contains an Entity, which is any object that appears in the game world. They have a position and colour.

Definition at line 14 of file Entity.h.

Constructor & Destructor Documentation

Entity::Entity ( cgg::Mat43  )

PURE VIRTUAL Creates an Entity

PURE VIRTUAL Don't create this object

Parameters
cgg::Mat43- The transformation matrix
Entity::Entity ( cgg::Mat43  ,
cgg::Vec3   
)

PURE VIRTUAL Creates an Entity

PURE VIRTUAL Don't create this object

Parameters
cgg::Mat43- The transformation matrix
cgg::Vec3- Contains the colour r,g,b values
Entity::Entity ( cgg::Vec3  )

PURE VIRTUAL Creates an Entity

PURE VIRTUAL Don't create this object

Parameters
cgg::Vec3- Position
Entity::Entity ( cgg::Vec3  ,
cgg::Vec3   
)

PURE VIRTUAL Creates an Entity

PURE VIRTUAL Don't create this object

Parameters
cgg::Vec3- Position
cgg::Vec3- Contains the colour r,g,b values

Member Function Documentation

void Entity::changePosition ( cgg::Vec3  )

Change the position by this amount

The inputed Vec3 is +='d to the original transform

Parameters
cgg::Vec3- x,y,z to adjust by.
cgg::Vec3 Entity::getPosition ( )

Gets the current position

Gets the current position in a cgg::Vec3

Returns
cgg::Vec3 - Current Position.
virtual void Entity::render ( gl::Primitives *  )
pure virtual

Renders a primitive

Creates a primitive and passes it into primitiveList.

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

Implemented in Box, Ball, Bowl, and Jack.

void Entity::updateColour ( cgg::Vec3  )

Update the colour to this amount

The inputed Vec3 replaces the original transform

Parameters
cgg::Vec3the new colour.
void Entity::updatePosition ( cgg::Vec3  )

Update the position to this amount

The inputed Vec3 replaces the original transform

Parameters
cgg::Vec3- x,y,z to transform by.

Member Data Documentation

cgg::Vec3 Entity::colour
protected

cgg::Vec3 containing a colour's r,g,b values.

Definition at line 107 of file Entity.h.

cgg::Mat43 Entity::transform
protected

cgg::Mat43 containing a transform (position,rotation,scale).

Definition at line 104 of file Entity.h.


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