From bace5f32915c32426bdc05916af680c241d4c7b1 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 31 Aug 2021 16:48:30 +0100 Subject: [PATCH 1/4] cinnabar core-documentation --- include/cinnabar-core/time.hpp | 35 ++++- include/cinnabar-core/transform.hpp | 195 ++++++++++++++++++++++++++++ 2 files changed, 229 insertions(+), 1 deletion(-) diff --git a/include/cinnabar-core/time.hpp b/include/cinnabar-core/time.hpp index 9bbf5897..4c74c706 100644 --- a/include/cinnabar-core/time.hpp +++ b/include/cinnabar-core/time.hpp @@ -3,14 +3,47 @@ namespace ce { class Time { public: + /** + * @brief Construct a new Time object + * + */ Time(); ~Time(); - + /** + * @brief Calculates the FPS and DeltaTime + * + * @param dt weather to calculate the DeltaTime + * @param fps weather to calculate the FPS + */ void recalculate(bool dt = true, bool fps = true); + + /** + * @brief Updates the FPS and DeltaTime and makes a GameTick + * + * @param dt weather to calculate the DeltaTime + * @param fps weather to calculate the FPS + */ void update(bool dt = true, bool fps = true); + + /** + * @brief Wait until delta reches a certain values + * + * @param dt value to wait for + */ void waitUntilDelta(double dt); + /** + * @brief Get the Delta Time + * + * @return double + */ double getDeltaTime() { return m_dt; } + + /** + * @brief Get the FPS + * + * @return double + */ double getFPS() { return m_fps; }; private: diff --git a/include/cinnabar-core/transform.hpp b/include/cinnabar-core/transform.hpp index b7deea02..96d7748c 100644 --- a/include/cinnabar-core/transform.hpp +++ b/include/cinnabar-core/transform.hpp @@ -5,48 +5,243 @@ namespace ce { class Transform { public: + /** + * @brief Get a Vector globally pointing Upwards Global Up + * + * @return glm::vec3 + */ static glm::vec3 GetGlobalUp() { return glm::vec3(0.0f, 1.0f, 0.0f); } + /** + * @brief Construct a new Transform object + * + */ Transform(); + + /** + * @brief Destroy the Transform object + * + */ ~Transform(); + /** + * @brief Get the Parent Tranform object + * + * @return Transform* + */ Transform* getParent() { return m_parent; } + /** + * @brief Set the Parent Transform object + * + * @param parent + */ void setParent(Transform* parent) { m_parent = parent; } + /** + * @brief Get the Position of the transform + * + * @return glm::vec3 + */ glm::vec3 getPosition() { return m_pos; } + /** + * @brief Set the Position of the transform + * + * @param pos New Position + */ void setPosition(glm::vec3 pos) { m_pos = pos; } + /** + * @brief Set the Position of the transform + * + * @param x New X position + * @param y New Y position + * @param z New Z position + */ void setPosition(float x, float y, float z) { setPosition(glm::vec3(x, y, z)); } + /** + * @brief Translate (or move) the transform + * + * @param delta the amount to move by + */ void translate(glm::vec3 delta) { m_pos += delta; } + /** + * @brief Translate or move the transform by and X,Y,Z amount + * + * @param x X delta + * @param y Y delta + * @param z Z delta + */ void translate(float x, float y, float z) { translate(glm::vec3(x, y, z)); } + /** + * @brief Set the Pitch of the transfomr + * + * @param pitch + */ void setPitch(float pitch) { m_rot.x = pitch; } + /** + * @brief Rotate the transform's pitch + * + * @param delta + */ void pitch(float delta) { m_rot.x += delta; } + /** + * @brief Get the Pitch of the transform + * + * @return float + */ float getPitch() { return m_rot.x; } + /** + * @brief Set the Yaw of the transform + * + * @param yaw + */ void setYaw(float yaw) { m_rot.y = yaw; } + /** + * @brief Rotate the transform's Yaw + * + * @param delta + */ void yaw(float delta) { m_rot.y += delta; } + /** + * @brief Get the Yaw of the transform + * + * @return float + */ float getYaw() { return m_rot.y; } + /** + * @brief Set the Roll of the transform + * + * @param roll + */ void setRoll(float roll) { m_rot.z = roll; } + /** + * @brief Rotate the transform's Roll + * + * @param delta + */ void roll(float delta) { m_rot.z += delta; } + /** + * @brief Get the Roll of the transform + * + * @return float + */ float getRoll() { return m_rot.z; } + /** + * @brief Get the Rotation of the transform + * + * @return glm::vec3 + */ glm::vec3 getRotation() { return m_rot; } + /** + * @brief Set the Rotation of the transform + * + * @param rot + */ void setRotation(glm::vec3 rot) { m_rot = rot; } + /** + * @brief Set the Rotation of the transform + * + * @param x Pitch + * @param y Yaw + * @param z Roll + */ void setRotation(float x, float y, float z) { setRotation(glm::vec3(x, y, z)); } + /** + * @brief Rotate the transform by an amount + * + * @param delta + */ void rotate(glm::vec3 delta) { m_rot += delta; } + /** + * @brief Rotate the transform by an amount + * + * @param x Pitch + * @param y Yaw + * @param z Roll + */ void rotate(float x, float y, float z) { rotate(glm::vec3(x, y, z)); } + /** + * @brief Get the Scale of the transform + * + * @return glm::vec3 + */ glm::vec3 getScale() { return m_scale; } + /** + * @brief Set the Scale of the transform + * + * @param scale + */ void setScale(glm::vec3 scale) { m_scale = scale; } + /** + * @brief Set the Scale object via X,Y,Z + * + * @param x + * @param y + * @param z + */ void setScale(float x, float y, float z) { setScale(glm::vec3(x, y, z)); } + /** + * @brief Evenly set the Scale of the transform + * + * @param a Scale amount + */ void setScale(float a) { setScale(a, a, a); } + /** + * @brief Scale the transform via x,y,z + * + * @param delta + */ void scale(glm::vec3 delta) { m_scale *= delta; } + /** + * @brief Scale the transform by X,Y,Z + * + * @param x + * @param y + * @param z + */ void scale(float x, float y, float z) { scale(glm::vec3(x, y, z)); } + /** + * @brief Evenly scale the transform + * + * @param a + */ void scale(float a) { scale(a, a, a); } + /** + * @brief Get the Trasnform Matrix + * + * @return glm::mat4 + */ glm::mat4 getMatrix(); + /** + * @brief Get transform's Forward vector + * + * @param useYaw + * @param usePitch + * @param useRoll + * @return glm::vec3 + */ glm::vec3 getForward(bool useYaw = true, bool usePitch = true, bool useRoll = true); + /** + * @brief Get transform's Right vector + * + * @param useYaw + * @param usePitch + * @param useRoll + * @return glm::vec3 + */ glm::vec3 getRight(bool useYaw = true, bool usePitch = true, bool useRoll = true); + /** + * @brief Get transform's Up vector + * + * @param useYaw + * @param usePitch + * @param useRoll + * @return glm::vec3 + */ glm::vec3 getUp(bool useYaw = true, bool usePitch = true, bool useRoll = true); private: From d753a4a399d014ae950c09be18245d157b14382a Mon Sep 17 00:00:00 2001 From: Github Actions Date: Tue, 31 Aug 2021 15:49:01 +0000 Subject: [PATCH 2/4] docs update --- docs/d3/dfa/classce_1_1Transform.html | 279 ++++++++++++++++++ docs/d6/deb/transform_8hpp_source.html | 177 +++++------ ...nnabar-render-demo_2main_8cpp-example.html | 24 +- docs/de/d99/time_8hpp_source.html | 44 +-- docs/df/d10/classce_1_1Time.html | 40 +++ 5 files changed, 443 insertions(+), 121 deletions(-) diff --git a/docs/d3/dfa/classce_1_1Transform.html b/docs/d3/dfa/classce_1_1Transform.html index 9e0c8a53..d8f12ee5 100644 --- a/docs/d3/dfa/classce_1_1Transform.html +++ b/docs/d3/dfa/classce_1_1Transform.html @@ -97,77 +97,112 @@

Public Member Functions

 Transform () + Construct a new Transform object. More...
   ~Transform () + Destroy the Transform object. More...
  TransformgetParent () + Get the Parent Tranform object. More...
  void setParent (Transform *parent) + Set the Parent Transform object. More...
  glm::vec3 getPosition () + Get the Position of the transform. More...
  void setPosition (glm::vec3 pos) + Set the Position of the transform. More...
  void setPosition (float x, float y, float z) + Set the Position of the transform. More...
  void translate (glm::vec3 delta) + Translate (or move) the transform. More...
  void translate (float x, float y, float z) + Translate or move the transform by and X,Y,Z amount. More...
  void setPitch (float pitch) + Set the Pitch of the transfomr. More...
  void pitch (float delta) + Rotate the transform's pitch. More...
  float getPitch () + Get the Pitch of the transform. More...
  void setYaw (float yaw) + Set the Yaw of the transform. More...
  void yaw (float delta) + Rotate the transform's Yaw. More...
  float getYaw () + Get the Yaw of the transform. More...
  void setRoll (float roll) + Set the Roll of the transform. More...
  void roll (float delta) + Rotate the transform's Roll. More...
  float getRoll () + Get the Roll of the transform. More...
  glm::vec3 getRotation () + Get the Rotation of the transform. More...
  void setRotation (glm::vec3 rot) + Set the Rotation of the transform. More...
  void setRotation (float x, float y, float z) + Set the Rotation of the transform. More...
  void rotate (glm::vec3 delta) + Rotate the transform by an amount. More...
  void rotate (float x, float y, float z) + Rotate the transform by an amount. More...
  glm::vec3 getScale () + Get the Scale of the transform. More...
  void setScale (glm::vec3 scale) + Set the Scale of the transform. More...
  void setScale (float x, float y, float z) + Set the Scale object via X,Y,Z. More...
  void setScale (float a) + Evenly set the Scale of the transform. More...
  void scale (glm::vec3 delta) + Scale the transform via x,y,z. More...
  void scale (float x, float y, float z) + Scale the transform by X,Y,Z. More...
  void scale (float a) + Evenly scale the transform. More...
  glm::mat4 getMatrix () + Get the Trasnform Matrix. More...
  glm::vec3 getForward (bool useYaw=true, bool usePitch=true, bool useRoll=true) + Get transform's Forward vector. More...
  glm::vec3 getRight (bool useYaw=true, bool usePitch=true, bool useRoll=true) + Get transform's Right vector. More...
  glm::vec3 getUp (bool useYaw=true, bool usePitch=true, bool useRoll=true) + Get transform's Up vector. More...
  +

Static Public Member Functions

static glm::vec3 GetGlobalUp ()
 Get a Vector globally pointing Upwards Global Up. More...
 

Detailed Description

@@ -189,6 +224,8 @@

+

Construct a new Transform object.

+ @@ -206,6 +243,8 @@

+

Destroy the Transform object.

+

Member Function Documentation

@@ -240,6 +279,17 @@

+ +

Get transform's Forward vector.

+
Parameters
+ + + + +
useYaw
usePitch
useRoll
+
+
+
Returns
glm::vec3
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -268,6 +318,9 @@

+

Get a Vector globally pointing Upwards Global Up.

+
Returns
glm::vec3
+
@@ -285,6 +338,9 @@

+

Get the Trasnform Matrix.

+
Returns
glm::mat4
+
@@ -310,6 +366,9 @@

+

Get the Parent Tranform object.

+
Returns
Transform*
+
@@ -335,6 +394,9 @@

+

Get the Pitch of the transform.

+
Returns
float
+
@@ -360,6 +422,9 @@

+

Get the Position of the transform.

+
Returns
glm::vec3
+
@@ -393,6 +458,17 @@

+ +

Get transform's Right vector.

+
Parameters
+ + + + +
useYaw
usePitch
useRoll
+
+
+
Returns
glm::vec3
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -421,6 +497,9 @@

+

Get the Roll of the transform.

+
Returns
float
+
@@ -446,6 +525,9 @@

+

Get the Rotation of the transform.

+
Returns
glm::vec3
+
@@ -471,6 +553,9 @@

+

Get the Scale of the transform.

+
Returns
glm::vec3
+
@@ -505,6 +590,17 @@

+

Get transform's Up vector.

+
Parameters
+ + + + +
useYaw
usePitch
useRoll
+
+
+
Returns
glm::vec3
+
@@ -530,6 +626,9 @@

+

Get the Yaw of the transform.

+
Returns
float
+
@@ -555,6 +654,14 @@

+ +

Rotate the transform's pitch.

+
Parameters
+ + +
delta
+
+
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -583,6 +690,14 @@

+ +

Rotate the transform's Roll.

+
Parameters
+ + +
delta
+
+
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -628,6 +743,16 @@

+

Rotate the transform by an amount.

+
Parameters
+ + + + +
xPitch
yYaw
zRoll
+
+
+
@@ -654,6 +779,14 @@

+

Rotate the transform by an amount.

+
Parameters
+ + +
delta
+
+
+
@@ -680,6 +813,14 @@

+

Evenly scale the transform.

+
Parameters
+ + +
a
+
+
+
@@ -722,6 +863,16 @@

+

Scale the transform by X,Y,Z.

+
Parameters
+ + + + +
x
y
z
+
+
+
@@ -748,6 +899,14 @@

+

Scale the transform via x,y,z.

+
Parameters
+ + +
delta
+
+
+
@@ -774,6 +933,14 @@

+

Set the Parent Transform object.

+
Parameters
+ + +
parent
+
+
+ @@ -800,6 +967,14 @@

+

Set the Pitch of the transfomr.

+
Parameters
+ + +
pitch
+
+
+
@@ -842,6 +1017,16 @@

+

Set the Position of the transform.

+
Parameters
+ + + + +
xNew X position
yNew Y position
zNew Z position
+
+
+
@@ -867,6 +1052,14 @@

+ +

Set the Position of the transform.

+
Parameters
+ + +
posNew Position
+
+
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -896,6 +1089,14 @@

+

Set the Roll of the transform.

+
Parameters
+ + +
roll
+
+
+
@@ -938,6 +1139,16 @@

+

Set the Rotation of the transform.

+
Parameters
+ + + + +
xPitch
yYaw
zRoll
+
+
+
@@ -964,6 +1175,14 @@

+

Set the Rotation of the transform.

+
Parameters
+ + +
rot
+
+
+
@@ -990,6 +1209,14 @@

+

Evenly set the Scale of the transform.

+
Parameters
+ + +
aScale amount
+
+
+
@@ -1032,6 +1259,16 @@

+

Set the Scale object via X,Y,Z.

+
Parameters
+ + + + +
x
y
z
+
+
+
@@ -1057,6 +1294,14 @@

+ +

Set the Scale of the transform.

+
Parameters
+ + +
scale
+
+
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -1086,6 +1331,14 @@

+

Set the Yaw of the transform.

+
Parameters
+ + +
yaw
+
+
+
@@ -1128,6 +1381,16 @@

+

Translate or move the transform by and X,Y,Z amount.

+
Parameters
+ + + + +
xX delta
yY delta
zZ delta
+
+
+
@@ -1153,6 +1416,14 @@

+ +

Translate (or move) the transform.

+
Parameters
+ + +
deltathe amount to move by
+
+
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -1181,6 +1452,14 @@

+ +

Rotate the transform's Yaw.

+
Parameters
+ + +
delta
+
+
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
diff --git a/docs/d6/deb/transform_8hpp_source.html b/docs/d6/deb/transform_8hpp_source.html index 73566d14..a606e291 100644 --- a/docs/d6/deb/transform_8hpp_source.html +++ b/docs/d6/deb/transform_8hpp_source.html @@ -94,96 +94,97 @@
5 namespace ce {
6  class Transform {
7  public:
-
8  static glm::vec3 GetGlobalUp() { return glm::vec3(0.0f, 1.0f, 0.0f); }
-
9 
- - -
12 
-
13  Transform* getParent() { return m_parent; }
-
14  void setParent(Transform* parent) { m_parent = parent; }
-
15  glm::vec3 getPosition() { return m_pos; }
-
16  void setPosition(glm::vec3 pos) { m_pos = pos; }
-
17  void setPosition(float x, float y, float z) { setPosition(glm::vec3(x, y, z)); }
-
18  void translate(glm::vec3 delta) { m_pos += delta; }
-
19  void translate(float x, float y, float z) { translate(glm::vec3(x, y, z)); }
+
13  static glm::vec3 GetGlobalUp() { return glm::vec3(0.0f, 1.0f, 0.0f); }
+
14 
+
20 
-
21  void setPitch(float pitch) { m_rot.x = pitch; }
-
22  void pitch(float delta) { m_rot.x += delta; }
-
23  float getPitch() { return m_rot.x; }
-
24 
-
25  void setYaw(float yaw) { m_rot.y = yaw; }
-
26  void yaw(float delta) { m_rot.y += delta; }
-
27  float getYaw() { return m_rot.y; }
-
28 
-
29  void setRoll(float roll) { m_rot.z = roll; }
-
30  void roll(float delta) { m_rot.z += delta; }
-
31  float getRoll() { return m_rot.z; }
-
32 
-
33  glm::vec3 getRotation() { return m_rot; }
-
34  void setRotation(glm::vec3 rot) { m_rot = rot; }
-
35  void setRotation(float x, float y, float z) { setRotation(glm::vec3(x, y, z)); }
-
36  void rotate(glm::vec3 delta) { m_rot += delta; }
-
37  void rotate(float x, float y, float z) { rotate(glm::vec3(x, y, z)); }
-
38 
-
39  glm::vec3 getScale() { return m_scale; }
-
40  void setScale(glm::vec3 scale) { m_scale = scale; }
-
41  void setScale(float x, float y, float z) { setScale(glm::vec3(x, y, z)); }
-
42  void setScale(float a) { setScale(a, a, a); }
-
43  void scale(glm::vec3 delta) { m_scale *= delta; }
-
44  void scale(float x, float y, float z) { scale(glm::vec3(x, y, z)); }
-
45  void scale(float a) { scale(a, a, a); }
-
46 
-
47  glm::mat4 getMatrix();
-
48  glm::vec3 getForward(bool useYaw = true, bool usePitch = true, bool useRoll = true);
-
49  glm::vec3 getRight(bool useYaw = true, bool usePitch = true, bool useRoll = true);
-
50  glm::vec3 getUp(bool useYaw = true, bool usePitch = true, bool useRoll = true);
-
51 
-
52  private:
-
53  Transform* m_parent;
-
54  /*
-
55  * Pitch: X
-
56  * Yaw: Y
-
57  * Roll: Z
-
58  */
-
59  glm::vec3 m_pos, m_rot, m_scale;
-
60  };
-
61 }
+ +
26 
+
32  Transform* getParent() { return m_parent; }
+
38  void setParent(Transform* parent) { m_parent = parent; }
+
44  glm::vec3 getPosition() { return m_pos; }
+
50  void setPosition(glm::vec3 pos) { m_pos = pos; }
+
58  void setPosition(float x, float y, float z) { setPosition(glm::vec3(x, y, z)); }
+
64  void translate(glm::vec3 delta) { m_pos += delta; }
+
72  void translate(float x, float y, float z) { translate(glm::vec3(x, y, z)); }
+
73 
+
79  void setPitch(float pitch) { m_rot.x = pitch; }
+
85  void pitch(float delta) { m_rot.x += delta; }
+
91  float getPitch() { return m_rot.x; }
+
92 
+
98  void setYaw(float yaw) { m_rot.y = yaw; }
+
104  void yaw(float delta) { m_rot.y += delta; }
+
110  float getYaw() { return m_rot.y; }
+
111 
+
117  void setRoll(float roll) { m_rot.z = roll; }
+
123  void roll(float delta) { m_rot.z += delta; }
+
129  float getRoll() { return m_rot.z; }
+
130 
+
136  glm::vec3 getRotation() { return m_rot; }
+
142  void setRotation(glm::vec3 rot) { m_rot = rot; }
+
150  void setRotation(float x, float y, float z) { setRotation(glm::vec3(x, y, z)); }
+
156  void rotate(glm::vec3 delta) { m_rot += delta; }
+
164  void rotate(float x, float y, float z) { rotate(glm::vec3(x, y, z)); }
+
165 
+
171  glm::vec3 getScale() { return m_scale; }
+
177  void setScale(glm::vec3 scale) { m_scale = scale; }
+
185  void setScale(float x, float y, float z) { setScale(glm::vec3(x, y, z)); }
+
191  void setScale(float a) { setScale(a, a, a); }
+
197  void scale(glm::vec3 delta) { m_scale *= delta; }
+
205  void scale(float x, float y, float z) { scale(glm::vec3(x, y, z)); }
+
211  void scale(float a) { scale(a, a, a); }
+
212 
+
218  glm::mat4 getMatrix();
+
227  glm::vec3 getForward(bool useYaw = true, bool usePitch = true, bool useRoll = true);
+
236  glm::vec3 getRight(bool useYaw = true, bool usePitch = true, bool useRoll = true);
+
245  glm::vec3 getUp(bool useYaw = true, bool usePitch = true, bool useRoll = true);
+
246 
+
247  private:
+
248  Transform* m_parent;
+
249  /*
+
250  * Pitch: X
+
251  * Yaw: Y
+
252  * Roll: Z
+
253  */
+
254  glm::vec3 m_pos, m_rot, m_scale;
+
255  };
+
256 }
Definition: transform.hpp:6
-
void setParent(Transform *parent)
Definition: transform.hpp:14
-
void setPosition(glm::vec3 pos)
Definition: transform.hpp:16
-
void roll(float delta)
Definition: transform.hpp:30
-
glm::vec3 getForward(bool useYaw=true, bool usePitch=true, bool useRoll=true)
-
glm::vec3 getRotation()
Definition: transform.hpp:33
-
float getRoll()
Definition: transform.hpp:31
-
void yaw(float delta)
Definition: transform.hpp:26
-
void setScale(float x, float y, float z)
Definition: transform.hpp:41
-
void setScale(float a)
Definition: transform.hpp:42
- -
glm::vec3 getUp(bool useYaw=true, bool usePitch=true, bool useRoll=true)
-
void setPosition(float x, float y, float z)
Definition: transform.hpp:17
-
void setScale(glm::vec3 scale)
Definition: transform.hpp:40
-
glm::vec3 getPosition()
Definition: transform.hpp:15
-
static glm::vec3 GetGlobalUp()
Definition: transform.hpp:8
-
void setRotation(glm::vec3 rot)
Definition: transform.hpp:34
- -
void scale(glm::vec3 delta)
Definition: transform.hpp:43
-
void setRoll(float roll)
Definition: transform.hpp:29
-
Transform * getParent()
Definition: transform.hpp:13
-
void setRotation(float x, float y, float z)
Definition: transform.hpp:35
-
void translate(glm::vec3 delta)
Definition: transform.hpp:18
-
glm::vec3 getScale()
Definition: transform.hpp:39
-
void pitch(float delta)
Definition: transform.hpp:22
-
void translate(float x, float y, float z)
Definition: transform.hpp:19
-
void scale(float x, float y, float z)
Definition: transform.hpp:44
-
void setYaw(float yaw)
Definition: transform.hpp:25
-
glm::mat4 getMatrix()
-
float getYaw()
Definition: transform.hpp:27
-
void setPitch(float pitch)
Definition: transform.hpp:21
-
glm::vec3 getRight(bool useYaw=true, bool usePitch=true, bool useRoll=true)
-
float getPitch()
Definition: transform.hpp:23
-
void rotate(float x, float y, float z)
Definition: transform.hpp:37
-
void rotate(glm::vec3 delta)
Definition: transform.hpp:36
-
void scale(float a)
Definition: transform.hpp:45
+
void setParent(Transform *parent)
Set the Parent Transform object.
Definition: transform.hpp:38
+
void setPosition(glm::vec3 pos)
Set the Position of the transform.
Definition: transform.hpp:50
+
void roll(float delta)
Rotate the transform's Roll.
Definition: transform.hpp:123
+
glm::vec3 getForward(bool useYaw=true, bool usePitch=true, bool useRoll=true)
Get transform's Forward vector.
+
glm::vec3 getRotation()
Get the Rotation of the transform.
Definition: transform.hpp:136
+
float getRoll()
Get the Roll of the transform.
Definition: transform.hpp:129
+
void yaw(float delta)
Rotate the transform's Yaw.
Definition: transform.hpp:104
+
void setScale(float x, float y, float z)
Set the Scale object via X,Y,Z.
Definition: transform.hpp:185
+
void setScale(float a)
Evenly set the Scale of the transform.
Definition: transform.hpp:191
+
~Transform()
Destroy the Transform object.
+
glm::vec3 getUp(bool useYaw=true, bool usePitch=true, bool useRoll=true)
Get transform's Up vector.
+
void setPosition(float x, float y, float z)
Set the Position of the transform.
Definition: transform.hpp:58
+
void setScale(glm::vec3 scale)
Set the Scale of the transform.
Definition: transform.hpp:177
+
glm::vec3 getPosition()
Get the Position of the transform.
Definition: transform.hpp:44
+
static glm::vec3 GetGlobalUp()
Get a Vector globally pointing Upwards Global Up.
Definition: transform.hpp:13
+
void setRotation(glm::vec3 rot)
Set the Rotation of the transform.
Definition: transform.hpp:142
+
Transform()
Construct a new Transform object.
+
void scale(glm::vec3 delta)
Scale the transform via x,y,z.
Definition: transform.hpp:197
+
void setRoll(float roll)
Set the Roll of the transform.
Definition: transform.hpp:117
+
Transform * getParent()
Get the Parent Tranform object.
Definition: transform.hpp:32
+
void setRotation(float x, float y, float z)
Set the Rotation of the transform.
Definition: transform.hpp:150
+
void translate(glm::vec3 delta)
Translate (or move) the transform.
Definition: transform.hpp:64
+
glm::vec3 getScale()
Get the Scale of the transform.
Definition: transform.hpp:171
+
void pitch(float delta)
Rotate the transform's pitch.
Definition: transform.hpp:85
+
void translate(float x, float y, float z)
Translate or move the transform by and X,Y,Z amount.
Definition: transform.hpp:72
+
void scale(float x, float y, float z)
Scale the transform by X,Y,Z.
Definition: transform.hpp:205
+
void setYaw(float yaw)
Set the Yaw of the transform.
Definition: transform.hpp:98
+
glm::mat4 getMatrix()
Get the Trasnform Matrix.
+
float getYaw()
Get the Yaw of the transform.
Definition: transform.hpp:110
+
void setPitch(float pitch)
Set the Pitch of the transfomr.
Definition: transform.hpp:79
+
glm::vec3 getRight(bool useYaw=true, bool usePitch=true, bool useRoll=true)
Get transform's Right vector.
+
float getPitch()
Get the Pitch of the transform.
Definition: transform.hpp:91
+
void rotate(float x, float y, float z)
Rotate the transform by an amount.
Definition: transform.hpp:164
+
void rotate(glm::vec3 delta)
Rotate the transform by an amount.
Definition: transform.hpp:156
+
void scale(float a)
Evenly scale the transform.
Definition: transform.hpp:211
Definition: asset_manager.hpp:5
diff --git a/docs/dc/d97/_2github_2workspace_2src_2cinnabar-render-demo_2main_8cpp-example.html b/docs/dc/d97/_2github_2workspace_2src_2cinnabar-render-demo_2main_8cpp-example.html index e4e6d43d..6e7a24f1 100644 --- a/docs/dc/d97/_2github_2workspace_2src_2cinnabar-render-demo_2main_8cpp-example.html +++ b/docs/dc/d97/_2github_2workspace_2src_2cinnabar-render-demo_2main_8cpp-example.html @@ -270,19 +270,19 @@
void setSize(glm::vec2 size)
Definition: time.hpp:4
-
void update(bool dt=true, bool fps=true)
-
void waitUntilDelta(double dt)
-
double getDeltaTime()
Definition: time.hpp:13
-
double getFPS()
Definition: time.hpp:14
+
void update(bool dt=true, bool fps=true)
Updates the FPS and DeltaTime and makes a GameTick.
+
void waitUntilDelta(double dt)
Wait until delta reches a certain values.
+
double getDeltaTime()
Get the Delta Time.
Definition: time.hpp:40
+
double getFPS()
Get the FPS.
Definition: time.hpp:47
Definition: transform.hpp:6
-
void setPosition(glm::vec3 pos)
Definition: transform.hpp:16
-
void roll(float delta)
Definition: transform.hpp:30
-
glm::vec3 getForward(bool useYaw=true, bool usePitch=true, bool useRoll=true)
-
void yaw(float delta)
Definition: transform.hpp:26
-
void setScale(glm::vec3 scale)
Definition: transform.hpp:40
-
void translate(glm::vec3 delta)
Definition: transform.hpp:18
-
void pitch(float delta)
Definition: transform.hpp:22
-
glm::vec3 getRight(bool useYaw=true, bool usePitch=true, bool useRoll=true)
+
void setPosition(glm::vec3 pos)
Set the Position of the transform.
Definition: transform.hpp:50
+
void roll(float delta)
Rotate the transform's Roll.
Definition: transform.hpp:123
+
glm::vec3 getForward(bool useYaw=true, bool usePitch=true, bool useRoll=true)
Get transform's Forward vector.
+
void yaw(float delta)
Rotate the transform's Yaw.
Definition: transform.hpp:104
+
void setScale(glm::vec3 scale)
Set the Scale of the transform.
Definition: transform.hpp:177
+
void translate(glm::vec3 delta)
Translate (or move) the transform.
Definition: transform.hpp:64
+
void pitch(float delta)
Rotate the transform's pitch.
Definition: transform.hpp:85
+
glm::vec3 getRight(bool useYaw=true, bool usePitch=true, bool useRoll=true)
Get transform's Right vector.
Definition: window.hpp:7
static void setMouseVisibility(bool enabled)
glm::vec2 getWindowSize()
diff --git a/docs/de/d99/time_8hpp_source.html b/docs/de/d99/time_8hpp_source.html index d93e7805..d9a22cf6 100644 --- a/docs/de/d99/time_8hpp_source.html +++ b/docs/de/d99/time_8hpp_source.html @@ -92,28 +92,30 @@
3 namespace ce {
4  class Time {
5  public:
-
6  Time();
-
7  ~Time();
-
8 
-
9  void recalculate(bool dt = true, bool fps = true);
-
10  void update(bool dt = true, bool fps = true);
-
11  void waitUntilDelta(double dt);
-
12 
-
13  double getDeltaTime() { return m_dt; }
-
14  double getFPS() { return m_fps; };
-
15 
-
16  private:
-
17  unsigned long m_now, m_last;
-
18  double m_dt, m_fps;
-
19  };
-
20 }
+
10  Time();
+
11  ~Time();
+
18  void recalculate(bool dt = true, bool fps = true);
+
19 
+
26  void update(bool dt = true, bool fps = true);
+
27 
+
33  void waitUntilDelta(double dt);
+
34 
+
40  double getDeltaTime() { return m_dt; }
+
41 
+
47  double getFPS() { return m_fps; };
+
48 
+
49  private:
+
50  unsigned long m_now, m_last;
+
51  double m_dt, m_fps;
+
52  };
+
53 }
Definition: time.hpp:4
-
void recalculate(bool dt=true, bool fps=true)
-
void update(bool dt=true, bool fps=true)
-
void waitUntilDelta(double dt)
-
double getDeltaTime()
Definition: time.hpp:13
- -
double getFPS()
Definition: time.hpp:14
+
void recalculate(bool dt=true, bool fps=true)
Calculates the FPS and DeltaTime.
+
void update(bool dt=true, bool fps=true)
Updates the FPS and DeltaTime and makes a GameTick.
+
void waitUntilDelta(double dt)
Wait until delta reches a certain values.
+
double getDeltaTime()
Get the Delta Time.
Definition: time.hpp:40
+
Time()
Construct a new Time object.
+
double getFPS()
Get the FPS.
Definition: time.hpp:47
Definition: asset_manager.hpp:5
diff --git a/docs/df/d10/classce_1_1Time.html b/docs/df/d10/classce_1_1Time.html index 1c1a127b..22ea1fcf 100644 --- a/docs/df/d10/classce_1_1Time.html +++ b/docs/df/d10/classce_1_1Time.html @@ -96,18 +96,24 @@

Public Member Functions

 Time () + Construct a new Time object. More...
   ~Time ()   void recalculate (bool dt=true, bool fps=true) + Calculates the FPS and DeltaTime. More...
  void update (bool dt=true, bool fps=true) + Updates the FPS and DeltaTime and makes a GameTick. More...
  void waitUntilDelta (double dt) + Wait until delta reches a certain values. More...
  double getDeltaTime () + Get the Delta Time. More...
  double getFPS () + Get the FPS. More...
 

Detailed Description

@@ -129,6 +135,8 @@

+

Construct a new Time object.

+ @@ -171,6 +179,9 @@

+ +

Get the Delta Time.

+
Returns
double
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -198,6 +209,9 @@

+ +

Get the FPS.

+
Returns
double
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -229,6 +243,15 @@

+

Calculates the FPS and DeltaTime.

+
Parameters
+ + + +
dtweather to calculate the DeltaTime
fpsweather to calculate the FPS
+
+
+
@@ -256,6 +279,15 @@

+ +

Updates the FPS and DeltaTime and makes a GameTick.

+
Parameters
+ + + +
dtweather to calculate the DeltaTime
fpsweather to calculate the FPS
+
+
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
@@ -276,6 +308,14 @@

+ +

Wait until delta reches a certain values.

+
Parameters
+ + +
dtvalue to wait for
+
+
Examples
/github/workspace/src/cinnabar-render-demo/main.cpp.
From e6c9d7dfd198dc19acbb7850c78171730c131903 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 31 Aug 2021 17:00:26 +0100 Subject: [PATCH 3/4] actions --- .github/workflows/Doxygen.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Doxygen.yml b/.github/workflows/Doxygen.yml index 311ebfee..a3a4f2cc 100644 --- a/.github/workflows/Doxygen.yml +++ b/.github/workflows/Doxygen.yml @@ -1,5 +1,5 @@ name: Documentation Generation -on: [push, pull_request] +on: [push] jobs: Doxygen: runs-on: ubuntu-latest From b50dd333ea3daadf153eed4be7a4716595f7d0ac Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 31 Aug 2021 17:04:16 +0100 Subject: [PATCH 4/4] push only --- .github/workflows/UnitTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 5141ad25..72897813 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -1,5 +1,5 @@ name: Unit Testing -on: [push, pull_request] +on: [push] jobs: Debian: runs-on: ubuntu-latest