Add transformation to objects.
This commit is contained in:
@@ -9,9 +9,23 @@
|
||||
|
||||
#include <ray.h>
|
||||
#include <object.h>
|
||||
#include <matrix.h>
|
||||
#include <tuple.h>
|
||||
#include <intersect.h>
|
||||
|
||||
Object::Object()
|
||||
{
|
||||
this->transformMatrix = Matrix4().identity();
|
||||
this->inverseTransform = this->transformMatrix.inverse();
|
||||
}
|
||||
|
||||
Intersect Object::intersect(Ray r)
|
||||
{
|
||||
return Intersect();
|
||||
};
|
||||
};
|
||||
|
||||
void Object::setTransform(Matrix transform)
|
||||
{
|
||||
this->transformMatrix = transform;
|
||||
this->inverseTransform = transform.inverse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user