Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
transform.h
1
9
#pragma once
10
11
#ifndef TRANSFORM_H_DEFINED
12
#define TRANSFORM_H_DEFINED
13
14
#include "core.h"
15
#include <Entities\component.h>
16
#include <Math\vec3.h>
17
#include <Math\vec2.h>
18
#include <Math\mat3.h>
19
20
namespace
rune
{
21
22
class
RUNE_ENGINE
Transform
:
public
rune::Component
23
{
24
private
:
25
26
rune::Vec3
position;
27
rune::Vec3
scale;
28
rune::Vec3
rotation;
29
rune::Vec3
localPosition =
rune::Vec3
(0,0,0);
30
rune::Vec2
bounds;
31
32
public
:
34
Transform
* parentTransform =
nullptr
;
35
37
Transform
(
rune::Vec3
newPosition =
rune::Vec3
(0,0,0),
rune::Vec3
newScale =
rune::Vec3
(1,1,1),
rune::Vec3
newRotation =
rune::Vec3
(0,0,0));
38
40
virtual
void
update()
override
;
41
43
void
setScale(
rune::Vec3
);
45
void
setScaleX(
double
);
47
void
setScaleY(
double
);
49
void
setScaleZ(
double
);
50
52
void
setPosition(
rune::Vec3
);
54
void
setPositionX(
double
);
56
void
setPositionY(
double
);
58
void
setPositionZ(
double
);
59
61
void
setRotation(
rune::Vec3
);
63
void
setRotationX(
double
);
65
void
setRotationY(
double
);
67
void
setRotationZ(
double
);
68
70
void
setLocalPosition(
rune::Vec3
newLocalPosition);
71
73
rune::Vec3
getPosition(
void
);
75
rune::Vec3
getScale(
void
);
77
rune::Vec3
getRotation(
void
);
79
rune::Vec3
getLocalPosition(
void
);
80
82
void
setBounds(
rune::Vec2
newBounds);
84
rune::Vec2
getBounds(
void
);
85
86
};
87
88
}
89
90
#endif
rune::Component
A component of a rune::GameObject, this class is used to add functionality to a object in the game wo...
Definition:
component.h:23
rune::Vec3
1 x 3 vector to be used for math.
Definition:
vec3.h:22
rune::Transform
A data structure that contains position, size, and rotation.
Definition:
transform.h:23
rune::Vec2
1 x 2 vector to be used for math.
Definition:
vec2.h:20
rune
The main namespace to be used for interfacing with the engine.
Definition:
animator.h:21
RuneEngine
src
Entities
transform.h
Generated on Tue Feb 2 2021 12:53:34 for the Rune Engine with
1.8.18.