Enable scene graph nodes to have transforms relative to parent node.

This commit is contained in:
Kalle Bladin
2016-08-15 13:08:30 -04:00
parent b0d8dd59f4
commit 2f05c8a5f0
3 changed files with 35 additions and 16 deletions
+3 -2
View File
@@ -75,9 +75,10 @@ public:
void setParent(SceneGraphNode* parent);
//bool abandonChild(SceneGraphNode* child);
const glm::dvec3& position() const;
glm::dvec3 position() const;
glm::dvec3 worldPosition() const;
const glm::dmat3& rotationMatrix() const;
const glm::dmat3& worldRotationMatrix() const;
SceneGraphNode* parent() const;
@@ -122,7 +123,7 @@ private:
bool _boundingSphereVisible;
PowerScaledScalar _boundingSphere;
//psc _worldPositionCached;
glm::dvec3 _translation; // Relative translation added on the ephemeris position
glm::dvec3 _worldPositionCached;
glm::dmat3 _worldRotationCached;
};