Flock You!
 All Classes Files Functions Variables
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*/
16  /*The Boid position*/
18  /*The Boid scale*/
20  /*The Boid 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(Texture *, Vec2, Vec2)
Definition: boid.cpp:6
Vec2 velocity
Definition: boid.h:21
Creates an Vec2 structure with functions Creates an Vec2 structure with overloaded operators to creat...
Definition: vec2.h:7
Vec2 position
Definition: boid.h:17
void setVelocity(Vec2)
Definition: boid.cpp:73
~Boid()
Definition: boid.cpp:21
Vec2 getScale()
Definition: boid.cpp:55
Texture * texture
Definition: boid.h:15
Vec2 getVelocity()
Definition: boid.cpp:82
void display(SDL_Renderer *)
Definition: boid.cpp:64
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:12
Creates an Boid object Creates an Boid object that is to be used for each Boid.
Definition: boid.h:11
Vec2 scale
Definition: boid.h:19
void setPosition(Vec2)
Definition: boid.cpp:28
void setScale(Vec2)
Definition: boid.cpp:46
Vec2 getPosition()
Definition: boid.cpp:37