Files
Seele/src/Engine/Component/Transform.h
T

40 lines
1.1 KiB
C++
Raw Normal View History

#pragma once
#include "Math/Transform.h"
#include "Component.h"
namespace Seele
{
namespace Component
{
struct Transform
{
2023-01-21 18:43:21 +01:00
Vector getPosition() const { return transform.getPosition(); }
Quaternion getRotation() const { return transform.getRotation(); }
Vector getScale() const { return transform.getScale(); }
2023-01-21 18:43:21 +01:00
Vector getForward() const { return transform.getForward(); }
Vector getUp() const { return transform.getUp(); }
Vector getRight() const { return transform.getRight(); }
2023-01-21 18:43:21 +01:00
Matrix4 toMatrix() const { return transform.toMatrix(); }
2023-01-21 18:43:21 +01:00
void setPosition(Vector pos);
void setRotation(Quaternion quat);
void setScale(Vector scale);
2022-11-29 16:34:42 +01:00
2023-01-21 18:43:21 +01:00
void setRelativeLocation(Vector location);
void setRelativeRotation(Quaternion rotation);
void setRelativeRotation(Vector rotation);
void setRelativeScale(Vector scale);
2023-01-21 18:43:21 +01:00
void addRelativeLocation(Vector translation);
void addRelativeRotation(Quaternion rotation);
void addRelativeRotation(Vector rotation);
private:
Math::Transform transform;
};
DECLARE_COMPONENT(Transform)
} // namespace Component
} // namespace Seele