blob: 2a2a51e211a94c96d62635cb4475eea32872042d (
plain)
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
|
#pragma once
#include <libultraship.h>
#include "engine/SpawnParams.h"
// Editor
#include "engine/editor/EditorMath.h"
extern "C" {
#include "camera.h"
#include "objects.h"
}
class OObject {
public:
uint8_t uuid[16];
Object o;
const char* Name = "";
const char* ResourceName = "";
bool bPendingDestroy = false;
s32 _objectIndex = -1;
const char* Model = "";
FVector SpawnPos = {0.0f, 0.0f, 0.0f};
IRotator SpawnRot = {0, 0, 0};
FVector SpawnScale = {1.0f, 1.0f, 1.0f};
float Speed = 0.0f;
std::vector<Triangle> Triangles;
virtual ~OObject() = default;
explicit OObject();
explicit OObject(SpawnParams params);
virtual void SetSpawnParams(SpawnParams& params);
virtual void Tick();
virtual void Tick60fps();
virtual void Draw(s32 cameraId);
virtual void Expire();
virtual void Destroy(); // Mark object for deletion at the start of the next frame
virtual void Reset();
FVector GetLocation() const;
IRotator GetRotation() const;
FVector GetScale() const;
virtual void Translate(FVector pos);
void Rotate(IRotator rot);
void SetScale(FVector scale);
virtual void DrawEditorProperties() { DrawDefaultEditorProperties(); };
};
|