-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObject.h
52 lines (37 loc) · 1023 Bytes
/
Object.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once
#include "stdafx.h"
#include "AABB.h"
class Object
{
public:
Object(std::string, std::string);
void Update();
void CreateConvexHull();
std::vector<sf::Vector2f> GetPoints();
sf::Vector2f GetLocalCentre();
sf::Vector2f GetCentre();
sf::Vector2f GetWidthHeight();
void CalculateAABB();
float GetInvMass();
std::vector<sf::Vector2f> Hull;
sf::Transform matrix;
sf::Vector2f velocity;
float Rvelocity;
float mass;
float restitution;
float rotation;
std::string kind;
float width;
float height;
AABB* aabb;
sf::Vector2f acceleration;
sf::VertexArray *ptr;
sf::VertexArray *Cptr;
unsigned int ID;
bool checked = false;
std::string type;
sf::Vector2f GetFarthest(std::vector<sf::Vector2f>, sf::Vector2f);
float Dot(sf::Vector2f, sf::Vector2f);
std::vector<sf::Vector2f> FindHull(std::vector<sf::Vector2f>, sf::Vector2f, sf::Vector2f);
//std::vector<sf::Vector2f> Recursive(sf::Vector2f, sf::Vector2f, sf::Vector2f, std::vector<sf::Vector2f>, std::vector<sf::Vector2f>);
};