TransformComponent Class. This class defines the specific behaves of TransformComponent. More...
#include <TransformComponent.h>
Public Types | |
| enum | TransformComponentBits { Clean = 0 , NeedUpdateTLAS = 1 , MAX = 0x7FFFFFFF } |
| typedef uint32_t | TransformComponentFlags |
Public Member Functions | |
| TransformComponent () | |
| Constructor Function. | |
| virtual | ~TransformComponent () override=default |
| Destructor Function. | |
| virtual void | OnSerialize () override |
| This interface defines how to serialize. | |
| virtual void | OnDeSerialize () override |
| This interface defines how to deserialize. | |
| virtual void | DrawThis () override |
| This interface defines how to draw this component to property panel. | |
| void | SetPosition (const glm::vec3 &position) |
| Set the position 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 | SetScale (const glm::vec3 &scale) |
| Set the scale this component handled. Call CalMatrix() during this API. | |
| void | AddPosition (const glm::vec3 &position) |
| Add the position to this component handled. Call CalMatrix() during this API. | |
| void | AddRotation (const glm::vec3 &rotation) |
| Add the rotation to this component handled. Call CalMatrix() during this API. | |
| void | AddScale (const glm::vec3 &scale) |
| Add the scale to this component handled. Call CalMatrix() during this API. | |
| const glm::mat4 & | GetModelMatrix () |
| Get the modelMatrix variable. | |
| glm::mat4 | GetRotateMatrix () const |
| Get Rotate Matrix. | |
| const glm::vec3 & | GetPosition () const |
| Get the position variable. | |
| const glm::vec3 & | GetRotation () const |
| Get the rotation variable. | |
| const glm::vec3 & | GetScale () const |
| Get the scale variable. | |
| TransformComponentFlags | GetMarker () const |
| Get WorldMarkFlags this frame. | |
| void | Mark (TransformComponentFlags flags) |
| Mark TransformComponentFlags with flags. | |
| void | ClearMarkerWithBits (TransformComponentFlags flags) |
| Clear TransformComponentFlags with flags. | |
| uint64_t | GetModelBufferAddress () const |
| Get Model Buffer Address. | |
| virtual void | OnComponentAdded (const entt::entity &entity) |
| This interface defines the behaves on specific component added. Init with variable. | |
Protected Attributes | |
| entt::entity | m_Owner { entt::null } |
| This component's Owner entity. | |
Private Member Functions | |
| void | CalMatrix () |
| Calculate Model Matrix. | |
Private Attributes | |
| glm::mat4 | m_ModelMatrix = glm::mat4(1.0f) |
| The modelMatrix this component handled. | |
| Transform | m_Transform |
| The transform this component handled. | |
| TransformComponentFlags | m_Marker = TransformComponentBits::Clean |
| World State this frame. | |
| std::shared_ptr< VulkanBuffer > | m_ModelBuffer |
| Model Buffer. | |
TransformComponent Class. This class defines the specific behaves of TransformComponent.
Definition at line 28 of file TransformComponent.h.