bool sub-objects using relative coordinates, shape definitions using relative coordinates, this allows transform blocks in each, and shape references to combine absolute transform with the relative transform

git-svn-id: svn://anubis/fart/trunk@287 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop committed 2010-07-09 19:37:05 +00:00
1 parent b4a2c8ef8e
commit b0dfa2ee1f
7 files changed
+46 -30

No files matched your search

+7
View File
@@ -104,3 +104,10 @@ Ray Transform::transform_ray(const Ray & r)
Ray res(newPosition, newDirection);
return res;
}
Transform Transform::operator*(const Transform & other) const
{
Transform t;
t.m_matrix = m_matrix * other.m_matrix;
return t;
}
+1
View File
@@ -36,6 +36,7 @@ class Transform
Vector transform_direction(const Vector & v);
Vector transform_normal(const Vector & v);
Ray transform_ray(const Ray & r);
Transform operator*(const Transform & other) const;
protected:
Matrix m_matrix;