Flock You!
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Flock You!
boid.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <SDL.h>
4
#include "
texture.h
"
5
#include "
vec2.h
"
6
11
class
Boid
12
{
13
private
:
14
/*A pointer to Texture of the Boid*/
15
Texture
*
texture
;
16
/*The Boid position*/
17
Vec2
position
;
18
/*The Boid scale*/
19
Vec2
scale
;
20
/*The Boid velocity*/
21
Vec2
velocity
;
22
23
public
:
30
Boid
(
Texture
*,
Vec2
,
Vec2
);
31
35
~Boid
();
36
41
void
setPosition
(
Vec2
);
42
47
Vec2
getPosition
();
48
53
void
setScale
(
Vec2
);
54
59
Vec2
getScale
();
60
65
void
setVelocity
(
Vec2
);
66
71
Vec2
getVelocity
();
72
77
void
display
(SDL_Renderer *);
78
};
Boid::Boid
Boid(Texture *, Vec2, Vec2)
Definition:
boid.cpp:6
Boid::velocity
Vec2 velocity
Definition:
boid.h:21
Vec2
Creates an Vec2 structure with functions Creates an Vec2 structure with overloaded operators to creat...
Definition:
vec2.h:7
texture.h
Boid::position
Vec2 position
Definition:
boid.h:17
Boid::setVelocity
void setVelocity(Vec2)
Definition:
boid.cpp:73
Boid::~Boid
~Boid()
Definition:
boid.cpp:21
Boid::getScale
Vec2 getScale()
Definition:
boid.cpp:55
Boid::texture
Texture * texture
Definition:
boid.h:15
Boid::getVelocity
Vec2 getVelocity()
Definition:
boid.cpp:82
Boid::display
void display(SDL_Renderer *)
Definition:
boid.cpp:64
Texture
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition:
texture.h:12
Boid
Creates an Boid object Creates an Boid object that is to be used for each Boid.
Definition:
boid.h:11
Boid::scale
Vec2 scale
Definition:
boid.h:19
Boid::setPosition
void setPosition(Vec2)
Definition:
boid.cpp:28
Boid::setScale
void setScale(Vec2)
Definition:
boid.cpp:46
vec2.h
Boid::getPosition
Vec2 getPosition()
Definition:
boid.cpp:37
Generated on Mon Jun 1 2015 00:15:12 for Flock You! by
1.8.8