4 #include <glm/gtc/quaternion.hpp>
12 Transform(glm::vec3 center = glm::vec3(0),
float scale = 1.0);
13 Transform(
const Transform& transform,
const glm::vec3& positionDelta,
const glm::quat& orientationDelta);
16 const glm::vec3 &position()
const;
17 void setPosition(
const glm::vec3 &pos);
19 const glm::quat& orientation()
const;
20 void setOrientation(
const glm::quat& quat);
22 const glm::vec3& center()
const;
23 void setCenter(
const glm::vec3& center);
24 void setCenterAndAdjustPosition(
const glm::vec3& newCenter);
27 void setScale(
float scale);
29 void move(
const glm::vec3& dist);
30 void moveWorld(
const glm::vec3& dist);
32 void rotate(
const glm::quat &qrot);
33 void rotateWorld(
const glm::quat &qrot);
35 bool operator==(
const Transform &other)
const;
36 bool operator!=(
const Transform &other)
const;
38 const glm::mat4 matrix()
const;
40 glm::vec3 applyTo(
const glm::vec3 &vertex)
const;
41 glm::vec3 inverseApplyTo(
const glm::vec3 &vertex)
const;
47 glm::quat m_orientation;