-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScene View Integration.h
More file actions
35 lines (27 loc) · 952 Bytes
/
Copy pathScene View Integration.h
File metadata and controls
35 lines (27 loc) · 952 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
#pragma once
#include "SceneSystem.h"
#include <memory>
class SceneView {
private:
Scene* scene;
public:
SceneView() : scene(nullptr) {}
void SetScene(Scene* s) { scene = s; }
void Render() {
if (!scene) return;
for (const auto& [id, ent] : scene->GetAllEntities()) {
// Mocked scene rendering: show transform and name
printf("[SceneView] Entity %llu (%s)\n", id, ent.name.c_str());
printf(" Pos: %.2f, %.2f, %.2f\n",
ent.transform.position[0],
ent.transform.position[1],
ent.transform.position[2]);
if (ent.mesh)
printf(" Mesh: %s\n", ent.mesh->meshPath.c_str());
if (ent.rigidbody)
printf(" RigidBody: mass=%.2f static=%d\n",
ent.rigidbody->mass,
ent.rigidbody->isStatic);
}
}
};