Jamie Slowgrove - PGG Assignment 1 - SDL
 All Classes Functions
Public Member Functions | Protected Attributes | List of all members
Entity Class Reference

Creates an Entity object Creates an Entity object with a Texture (including variables for the source and destination dimensions) and position. More...

#include <entity.h>

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

Public Member Functions

 Entity (Texture *, float, float, int, int)
 
 ~Entity ()
 
void display (SDL_Renderer *)
 
void setX (float)
 
void setY (float)
 
float getX ()
 
float getY ()
 
void setSrcX (float)
 
void setSrcY (float)
 
int getSrcX ()
 
int getSrcY ()
 

Protected Attributes

Texturetexture
 
int srcWidth
 
int srcHeight
 
int srcX
 
int srcY
 
int width
 
int height
 
float x
 
float y
 

Detailed Description

Creates an Entity object Creates an Entity object with a Texture (including variables for the source and destination dimensions) and position.

Constructor & Destructor Documentation

Entity::Entity ( Texture inputTexture,
float  inputX,
float  inputY,
int  inputWidth,
int  inputHeight 
)

Constructs a Entity object Constructs the Entity object.

Parameters
Texture*a pointer to a Texture loaded into memory.
floatinitial x position.
floatinitial y position.
floatinitial sprite width.
floatinitial sprite height.
Entity::~Entity ( )

De-constructs an Entity object De-constructs the Entity object

Member Function Documentation

void Entity::display ( SDL_Renderer *  renderer)

Displays the modified Texture renderer Pushes the texture to the renderer using the dimensions specified in the Entity.

Parameters
SDL_Renderer*The renderer.

Here is the call graph for this function:

Here is the caller graph for this function:

int Entity::getSrcX ( )

Getter # source x position

Returns
int the source x position of the Entity object.

Here is the caller graph for this function:

int Entity::getSrcY ( )

Getter # source y position

Returns
int the source y position of the Entity object.

Here is the caller graph for this function:

float Entity::getX ( )

Getter # x position

Returns
the x position of the Entity object.

Here is the caller graph for this function:

float Entity::getY ( )

Getter # y position

Returns
the y position of the Entity object.

Here is the caller graph for this function:

void Entity::setSrcX ( float  inputX)

Setter # source x position Sets the source x position of the Entity object to the inputed source x position.

Parameters
floatthe inputed source x position

Here is the caller graph for this function:

void Entity::setSrcY ( float  inputY)

Setter # source y position Sets the source y position of the Entity object to the inputed source y position.

Parameters
floatthe inputed source y position

Here is the caller graph for this function:

void Entity::setX ( float  inputX)

Setter # x position Sets the x position of the Entity object to the inputed x position.

Parameters
floatthe inputed x position

Here is the caller graph for this function:

void Entity::setY ( float  inputY)

Setter # y position Sets the y position of the Entity object to the inputed y position.

Parameters
floatthe inputed y position

Here is the caller graph for this function:


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