Vivid
Loading...
Searching...
No Matches
Vivid::TransformComponent Class Reference

Contains the Transform Component. More...

#include <TransformComponent.h>

Inheritance diagram for Vivid::TransformComponent:
[legend]
Collaboration diagram for Vivid::TransformComponent:
[legend]

Public Member Functions

 TransformComponent (Maths::Vec3 position, Maths::Vec3 rotation, Maths::Vec3 scale)
 
Maths::Vec3 GetPosition () const
 
Maths::Vec3 GetRotation () const
 
Maths::Vec3 GetScale () const
 
glm::mat4 GetTransform ()
 
void SetPosition (Maths::Vec3 position)
 
void SetRotation (Maths::Vec3 rotation)
 
void SetScale (Maths::Vec3 scale)
 
ComponentType GetComponentType () override
 
ImGuizmo::OPERATION GetCurrentGizmoOperation () const
 
ImGuizmo::MODE GetCurrentGizmoMode () const
 
bool IsUsingSnap () const
 
float * GetSnap ()
 
void DrawGizmo (Camera *camera)
 
void Draw (Camera *camera) override
 
void ImGuiRender () override
 
- Public Member Functions inherited from Vivid::Component
virtual void Draw (Camera *camera)=0
 
virtual void ImGuiRender ()=0
 
int GetOwnerEntityID () const
 
void SetEntity (const int &entityID)
 
virtual ComponentType GetComponentType ()=0
 
int GetComponentID () const
 

Additional Inherited Members

- Protected Attributes inherited from Vivid::Component
int m_OwnerEntityID = 0
 

Detailed Description

Contains the Transform Component.

TransformComponent is a class that contains the Transform Component. It contains the position, rotation, and scale of the entity. This component is a must have for every entity. It also contains the transform matrix of the entity. It also contains the gizmo operation, gizmo mode, and snap values for the gizmo.

Definition at line 19 of file TransformComponent.h.

Constructor & Destructor Documentation

◆ TransformComponent() [1/2]

Vivid::TransformComponent::TransformComponent ( )
inline

Definition at line 38 of file TransformComponent.h.

◆ TransformComponent() [2/2]

Vivid::TransformComponent::TransformComponent ( Maths::Vec3  position,
Maths::Vec3  rotation,
Maths::Vec3  scale 
)
inline

Definition at line 45 of file TransformComponent.h.

Member Function Documentation

◆ Draw()

void Vivid::TransformComponent::Draw ( Camera camera)
overridevirtual

Implements Vivid::Component.

Definition at line 113 of file TransformComponent.cpp.

◆ DrawGizmo()

void Vivid::TransformComponent::DrawGizmo ( Camera camera)

Definition at line 117 of file TransformComponent.cpp.

◆ GetComponentType()

ComponentType Vivid::TransformComponent::GetComponentType ( )
inlineoverridevirtual

Implements Vivid::Component.

Definition at line 76 of file TransformComponent.h.

◆ GetCurrentGizmoMode()

ImGuizmo::MODE Vivid::TransformComponent::GetCurrentGizmoMode ( ) const
inline

Definition at line 79 of file TransformComponent.h.

◆ GetCurrentGizmoOperation()

ImGuizmo::OPERATION Vivid::TransformComponent::GetCurrentGizmoOperation ( ) const
inline

Definition at line 78 of file TransformComponent.h.

◆ GetPosition()

Maths::Vec3 Vivid::TransformComponent::GetPosition ( ) const
inline

Definition at line 55 of file TransformComponent.h.

◆ GetRotation()

Maths::Vec3 Vivid::TransformComponent::GetRotation ( ) const
inline

Definition at line 56 of file TransformComponent.h.

◆ GetScale()

Maths::Vec3 Vivid::TransformComponent::GetScale ( ) const
inline

Definition at line 57 of file TransformComponent.h.

◆ GetSnap()

float * Vivid::TransformComponent::GetSnap ( )
inline

Definition at line 81 of file TransformComponent.h.

◆ GetTransform()

glm::mat4 Vivid::TransformComponent::GetTransform ( )
inline

Definition at line 58 of file TransformComponent.h.

◆ ImGuiRender()

void Vivid::TransformComponent::ImGuiRender ( )
overridevirtual

Implements Vivid::Component.

Definition at line 76 of file TransformComponent.cpp.

◆ IsUsingSnap()

bool Vivid::TransformComponent::IsUsingSnap ( ) const
inline

Definition at line 80 of file TransformComponent.h.

◆ SetPosition()

void Vivid::TransformComponent::SetPosition ( Maths::Vec3  position)
inline

Definition at line 60 of file TransformComponent.h.

◆ SetRotation()

void Vivid::TransformComponent::SetRotation ( Maths::Vec3  rotation)
inline

Definition at line 65 of file TransformComponent.h.

◆ SetScale()

void Vivid::TransformComponent::SetScale ( Maths::Vec3  scale)
inline

Definition at line 70 of file TransformComponent.h.


The documentation for this class was generated from the following files: