-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleScene.h
More file actions
39 lines (30 loc) · 916 Bytes
/
ModuleScene.h
File metadata and controls
39 lines (30 loc) · 916 Bytes
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 "Module.h"
#include <vector>
#include "Globals.h"
#include "Primitive.h"
#include "GameObject.h"
#include "ComponentMesh.h"
#include <vector>
#define MAX_SNAKE 2
#define DIAMETER_WORLD 2500
struct PhysBody3D;
struct PhysMotor3D;
class ModuleScene : public Module
{
public:
ModuleScene(Application* app, bool start_enabled = true);
~ModuleScene();
bool Start();
update_status PreUpdate(float dt);
update_status Update(float dt);
bool CleanUp();
void OnCollision(PhysBody3D* body1, PhysBody3D* body2);
GameObject* CreateNewGameObject(GameObject* parent = nullptr, const char* name = "unnamed");
GameObject* root = nullptr;
GameObject* main_camera = nullptr;
private:
void CreateSphere(const vec3& position, float radius);
void CreateCube(const vec3& position, const vec3& size, float angle = 0.0f, const vec3& rotAxis = vec3(1, 1, 1));
std::vector<Primitive*> primitives;
};