SpiecsEngine
 
Loading...
Searching...
No Matches

◆ TransformComponent()

Spices::TransformComponent::TransformComponent ( )

Constructor Function.

Definition at line 24 of file TransformComponent.cpp.

25 : Component()
26 {
28
29 m_ModelBuffer = std::make_shared<VulkanBuffer>(
31 "ModelBuffer",
32 sizeof(glm::mat4),
33 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT ,
34 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
35 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
36 );
37
38 SetPosition({ 0.0f, 0.0f, 0.0f });
39 SetRotation({ 0.0f, 0.0f, 0.0f });
40 SetScale({ 1.0f, 1.0f, 1.0f });
41 }
#define SPICES_PROFILE_ZONE
Component()=default
Constructor Function.
std::shared_ptr< VulkanBuffer > m_ModelBuffer
Model Buffer.
void SetScale(const glm::vec3 &scale)
Set the scale this component handled. Call CalMatrix() during this API.
void SetRotation(const glm::vec3 &rotation)
Set the rotation this component handled. Call CalMatrix() during this API.
void SetPosition(const glm::vec3 &position)
Set the position this component handled. Call CalMatrix() during this API.
static VulkanState & GetState()
Get VulkanState in use.

References Spices::Component::Component().