diff --git a/main/fart.cc b/main/fart.cc index 4c1163d..2505820 100644 --- a/main/fart.cc +++ b/main/fart.cc @@ -28,6 +28,7 @@ int main(int argc, char * argv[]) map scene_options; static const struct option long_options[] = { + { "help", no_argument, NULL, 256 }, { "output-file", required_argument, NULL, 'o' }, { "width", required_argument, NULL, 'w' }, { "height", required_argument, NULL, 'h' }, @@ -41,6 +42,9 @@ int main(int argc, char * argv[]) { switch (opt) { + case 256: + usage(argv[0]); + break; case 'o': scene_options["output-file"] = optarg; break; diff --git a/util/Transform.cc b/util/Transform.cc index 276d6cb..74c051e 100644 --- a/util/Transform.cc +++ b/util/Transform.cc @@ -1,12 +1,22 @@ #include "Transform.h" -void Transform::push() +Transform::Transform() { - m_matrices.push(m_matrices.top()); + m_matrix = Matrix::identity(); } -void Transform::pop() +void Transform::translate(double x, double y, double z) { - m_matrices.pop(); + /* TODO: fill in */ +} + +void Transform::rotate(double amt, double xv, double yv, double zv) +{ + /* TODO: fill in */ +} + +void Transform::scale(double xs, double ys, double zs) +{ + /* TODO: fill in */ } diff --git a/util/Transform.h b/util/Transform.h index 5f65879..87a1e27 100644 --- a/util/Transform.h +++ b/util/Transform.h @@ -8,11 +8,13 @@ class Transform { public: - void push(); - void pop(); + Transform(); + void translate(double x, double y, double z); + void rotate(double amt, double xv, double yv, double zv); + void scale(double xs, double ys, double zs); protected: - std::stack m_matrices; + Matrix m_matrix; }; #endif