erebus
diff liberebus/src/snode.cc @ 46:c4d48a21bc4a
in the middle of the vmath->gph-math port
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 24 Feb 2016 00:26:50 +0200 |
parents | e9da2916bc79 |
children |
line diff
1.1 --- a/liberebus/src/snode.cc Tue Dec 29 12:19:53 2015 +0200 1.2 +++ b/liberebus/src/snode.cc Wed Feb 24 00:26:50 2016 +0200 1.3 @@ -72,59 +72,59 @@ 1.4 return obj[idx]; 1.5 } 1.6 1.7 -void SceneNode::set_position(const Vector3 &pos) 1.8 +void SceneNode::set_position(const Vec3 &pos) 1.9 { 1.10 this->pos = pos; 1.11 } 1.12 1.13 -void SceneNode::set_rotation(const Quaternion &rot) 1.14 +void SceneNode::set_rotation(const Quat &rot) 1.15 { 1.16 this->rot = rot; 1.17 } 1.18 1.19 -void SceneNode::set_scaling(const Vector3 &scale) 1.20 +void SceneNode::set_scaling(const Vec3 &scale) 1.21 { 1.22 this->scale = scale; 1.23 } 1.24 1.25 1.26 -const Vector3 &SceneNode::get_node_position() const 1.27 +const Vec3 &SceneNode::get_node_position() const 1.28 { 1.29 return pos; 1.30 } 1.31 1.32 -const Quaternion &SceneNode::get_node_rotation() const 1.33 +const Quat &SceneNode::get_node_rotation() const 1.34 { 1.35 return rot; 1.36 } 1.37 1.38 -const Vector3 &SceneNode::get_node_scaling() const 1.39 +const Vec3 &SceneNode::get_node_scaling() const 1.40 { 1.41 return scale; 1.42 } 1.43 1.44 1.45 -Vector3 SceneNode::get_position() const 1.46 +Vec3 SceneNode::get_position() const 1.47 { 1.48 - return Vector3{0, 0, 0}.transformed(xform); 1.49 + return Vec3{0, 0, 0}.transformed(xform); 1.50 } 1.51 1.52 -Quaternion SceneNode::get_rotation() const 1.53 +Quat SceneNode::get_rotation() const 1.54 { 1.55 return rot; // TODO 1.56 } 1.57 1.58 -Vector3 SceneNode::get_scaling() const 1.59 +Vec3 SceneNode::get_scaling() const 1.60 { 1.61 return scale; // TODO 1.62 } 1.63 1.64 -const Matrix4x4 &SceneNode::get_matrix() const 1.65 +const Mat4x4 &SceneNode::get_matrix() const 1.66 { 1.67 return xform; 1.68 } 1.69 1.70 -const Matrix4x4 &SceneNode::get_inv_matrix() const 1.71 +const Mat4x4 &SceneNode::get_inv_matrix() const 1.72 { 1.73 return inv_xform; 1.74 }