Rendering Engine 0.2.9
Modular Graphics Rendering Engine | v0.2.9
Loading...
Searching...
No Matches
drawable_3d.cpp
Go to the documentation of this file.
1#include "drawable_3d.hpp"
3#include "scene.hpp"
4
5namespace rendering_engine
6{
8 DrawableComponent(renderContext, scene)
9{}
10
15
16void Drawable3D::Update(float deltaTime)
17{
18 if (bUpdateOnTick)
19 {
21 }
22}
23
24void Drawable3D::SetPosition(const glm::vec3& position)
25{
27}
28
29void Drawable3D::SetRotation(const glm::vec3& rotation)
30{
32}
33
34void Drawable3D::SetScale(const glm::vec3& scale)
35{
37}
38
39const glm::vec3& Drawable3D::GetPosition() const
40{
42}
43
44const glm::vec3& Drawable3D::GetRotation() const
45{
47}
48
49const glm::vec3& Drawable3D::GetScale() const
50{
52}
53
58
63
68
69} // namespace rendering_engine
void Destroy() override
Requests destruction of this drawable.
void Initialize() override
Initializes render resource pointers (material, mesh, etc.). Must be called after setting material an...
const glm::vec3 & GetRotation() const
Gets the mesh rotation (pitch, yaw, roll in degrees).
SceneComponent & GetTransform()
Access to the underlying SceneComponent (transform).
const glm::vec3 & GetScale() const
Gets the mesh scale.
void SetRotation(const glm::vec3 &rotation)
Sets the mesh rotation in degrees.
Drawable3D(RenderResourceContext renderContext, Scene &scene)
Constructs the Drawable3D with a render context.
void SetScale(const glm::vec3 &scale)
Sets the mesh scale along each axis.
void SetPosition(const glm::vec3 &position)
Sets the mesh position in world space.
const glm::vec3 & GetPosition() const
Gets the mesh position.
void Update(float deltaTime) override
Updates logic (animation, movement, etc.) for this drawable.
Abstract base for all drawable (renderable) objects in the engine.
virtual void Initialize()
Initializes render resource pointers (material, mesh, etc.). Must be called after setting material an...
Represents a 3D transformable scene component with position, rotation, and scale.
const glm::vec3 & GetPosition() const
Gets the current position.
const glm::vec3 & GetRotation() const
Gets the current rotation as Euler angles (in radians).
void SetRotation(const glm::quat &rotation)
Sets the rotation using a quaternion.
void SetPosition(const glm::vec3 &position)
Sets the position of the component in world space.
const glm::vec3 & GetScale() const
Gets the current scale.
void SetScale(const glm::vec3 &scale)
Sets the scale for each dimension.
Base class representing a renderable scene.
Definition scene.hpp:44
void DestroyDrawable3D(Drawable3D *drawable3D)
Schedules a 3D drawable for deferred destruction.
Definition scene.cpp:149
Aggregates pointers to global rendering resource managers.