2024-12-25 23:58:56 +00:00
|
|
|
// Transform.h
|
|
|
|
#pragma once
|
2024-12-27 01:34:34 +00:00
|
|
|
|
|
|
|
#include "Component.h"
|
2024-12-25 23:58:56 +00:00
|
|
|
#include <glm/glm.hpp>
|
2024-12-27 01:34:34 +00:00
|
|
|
#include <yaml-cpp/yaml.h>
|
2024-12-25 23:58:56 +00:00
|
|
|
|
2024-12-27 01:34:34 +00:00
|
|
|
class TransformComponent : public Component
|
2024-12-25 23:58:56 +00:00
|
|
|
{
|
2024-12-27 01:34:34 +00:00
|
|
|
public:
|
|
|
|
glm::vec3 position;
|
|
|
|
glm::vec3 rotation;
|
|
|
|
glm::vec3 scale;
|
2024-12-25 23:58:56 +00:00
|
|
|
|
2024-12-27 01:34:34 +00:00
|
|
|
TransformComponent();
|
|
|
|
virtual const std::string& GetName() const override;
|
|
|
|
static const std::string& GetStaticName();
|
2024-12-25 23:58:56 +00:00
|
|
|
|
2024-12-27 01:34:34 +00:00
|
|
|
// Serialization methods
|
|
|
|
virtual YAML::Node Serialize() override;
|
|
|
|
virtual void Deserialize(const YAML::Node& node) override;
|
2024-12-25 23:58:56 +00:00
|
|
|
|
2024-12-27 01:34:34 +00:00
|
|
|
private:
|
|
|
|
static const std::string name;
|
|
|
|
};
|