Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
Public Member Functions | Protected Attributes | List of all members
Entity Class Reference

Creates an Entity object that contains the details for the Entity. More...

#include <entity.h>

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

Public Member Functions

 Entity (Texture *, Vec2, Vec2, int, int, int, int)
 
 ~Entity ()
 
void display (SDL_Renderer *)
 
void setPosition (Vec2)
 
Vec2 getPosition ()
 
int getWidth ()
 
int getHeight ()
 

Protected Attributes

Vec2 position
 
Vec2 source
 
int spriteWidth
 
int spriteHeight
 
int width
 
int height
 
Texturetexture
 

Detailed Description

Creates an Entity object that contains the details for the Entity.

Constructor & Destructor Documentation

Entity::Entity ( Texture inTexture,
Vec2  inPos,
Vec2  inSource,
int  inSpriteW,
int  inSpriteH,
int  w,
int  h 
)

Constructs an Entity object

Parameters
Texture* A pointer to the texture
Vec2The position of the Entity
Vec2The position of the sprite
intThe sprite width
intThe sprite height
intThe Entity width
intThe Entity height
Entity::~Entity ( )

Destructs the Entity object

Member Function Documentation

void Entity::display ( SDL_Renderer *  renderer)

Displays the Entity

Parameters
SLD_Renderer* A pointer to the renderer

Here is the call graph for this function:

Here is the caller graph for this function:

int Entity::getHeight ( )

Getter # Gets the height

Returns
int The height

Here is the caller graph for this function:

Vec2 Entity::getPosition ( )

Getter # Gets the position

Returns
Vec2 The position

Here is the caller graph for this function:

int Entity::getWidth ( )

Getter # Gets the width

Returns
int The width

Here is the caller graph for this function:

void Entity::setPosition ( Vec2  inPos)

Setter # Sets the position

Parameters
Vec2The new position

Member Data Documentation

int Entity::height
protected
Vec2 Entity::position
protected

The position of the Entity

Vec2 Entity::source
protected

The position of the sprite in the spritesheet

int Entity::spriteHeight
protected
int Entity::spriteWidth
protected

The dimensions of the sprite

Texture* Entity::texture
protected

A pointer to the Texture

int Entity::width
protected

The dimensions of the Entity


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