-
Notifications
You must be signed in to change notification settings - Fork 0
/
Scene.h
39 lines (23 loc) · 790 Bytes
/
Scene.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
#pragma once
#include "Object.h"
#include "PhysicalEngine.h"
class Scene {
public:
Scene() : selectedRigidBody(-1), physicalEngine(false) {}
void init();
void update(float dt);
void render();
int AddBox(int h, int w, int mass, ObjectType type = ObjectType::External);
void Select(int x, int y);
void Select(int index);
int GetSelectedRigidBody();
void ChangeMass(float mass, bool relative = true);
void Rotate(float angle, bool relative = true);
void Move(float x, float y, bool isRelative = false);
std::vector<Object *> GetRigidBodies();
int AddCircle(int r, int mass);
private:
PhysicalEngine physicalEngine;
std::vector<Object *> rigidBodies;
int selectedRigidBody;
};