Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
drawable_3d.cpp
Go to the documentation of this file.
1#include "drawable_3d.hpp"
3
4namespace rendering_engine
5{
9
14
15void Drawable3D::Update(float deltaTime)
16{
17 mSceneComponent.UpdateWorldMatrix();
18}
19
20void Drawable3D::SetPosition(const glm::vec3& position)
21{
22 mSceneComponent.SetPosition(position);
23}
24
25void Drawable3D::SetRotation(const glm::vec3& rotation)
26{
27 mSceneComponent.SetRotation(rotation);
28}
29
30void Drawable3D::SetScale(const glm::vec3& scale)
31{
32 mSceneComponent.SetScale(scale);
33}
34
35const glm::vec3& Drawable3D::GetPosition() const
36{
37 return mSceneComponent.GetPosition();
38}
39
40const glm::vec3& Drawable3D::GetRotation() const
41{
42 return mSceneComponent.GetRotation();
43}
44
45const glm::vec3& Drawable3D::GetScale() const
46{
47 return mSceneComponent.GetScale();
48}
49
54
59
60} // namespace rendering_engine
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.
Drawable3D(RenderResourceContext renderContext)
Constructs the Drawable3D with a render context.
void SetRotation(const glm::vec3 &rotation)
Sets the mesh rotation in degrees.
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.
virtual void Initialize()
Initializes render resource pointers (material, mesh, etc.). Must be called after setting material an...
DrawableComponent(RenderResourceContext renderContext)
Constructs the DrawableComponent with a resource context.
Represents a 3D transformable scene component with position, rotation, and scale.
Aggregates pointers to global rendering resource managers.