]> git.tdb.fi Git - libs/gl.git/blobdiff - source/keyframe.cpp
Check the flat qualifier from the correct member
[libs/gl.git] / source / keyframe.cpp
diff --git a/source/keyframe.cpp b/source/keyframe.cpp
deleted file mode 100644 (file)
index 8e0d790..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#include <msp/datafile/collection.h>
-#include "keyframe.h"
-#include "pose.h"
-
-using namespace std;
-
-namespace Msp {
-namespace GL {
-
-// Avoid synthesizing RefPtr c'tor and d'tor in files including keyframe.h
-KeyFrame::KeyFrame()
-{ }
-
-KeyFrame::~KeyFrame()
-{ }
-
-void KeyFrame::set_matrix(const Matrix &m)
-{
-       matrix = m;
-}
-
-void KeyFrame::set_pose(const Pose &p)
-{
-       pose = &p;
-       pose.keep();
-}
-
-
-KeyFrame::Loader::Loader(KeyFrame &k):
-       DataFile::CollectionObjectLoader<KeyFrame>(k, 0)
-{
-       init();
-}
-
-KeyFrame::Loader::Loader(KeyFrame &k, Collection &c):
-       DataFile::CollectionObjectLoader<KeyFrame>(k, &c)
-{
-       init();
-}
-
-void KeyFrame::Loader::init()
-{
-       add("pose", &Loader::pose);
-       add("pose", &Loader::pose_inline);
-       add("position", &Loader::position);
-       add("rotation", &Loader::rotation);
-       add("scaling", &Loader::scaling_uniform);
-       add("scaling", &Loader::scaling);
-}
-
-void KeyFrame::Loader::pose(const string &n)
-{
-       obj.pose = &get_collection().get<Pose>(n);
-       obj.pose.keep();
-}
-
-void KeyFrame::Loader::pose_inline()
-{
-       RefPtr<Pose> p = new Pose;
-       load_sub(*p, get_collection());
-       obj.pose = p;
-}
-
-void KeyFrame::Loader::position(float x, float y, float z)
-{
-       obj.matrix.translate(x, y, z);
-}
-
-void KeyFrame::Loader::rotation(float a, float x, float y, float z)
-{
-       obj.matrix.rotate_deg(a, x, y, z);
-}
-
-void KeyFrame::Loader::scaling_uniform(float s)
-{
-       obj.matrix.scale(s);
-}
-
-void KeyFrame::Loader::scaling(float x, float y, float z)
-{
-       obj.matrix.scale(x, y, z);
-}
-
-} // namespace GL
-} // namespace Msp