Matrix44f Camera::GetInverse() const { Matrix44f tempMatrix = myTransformation; Vector4f translation(tempMatrix.GetPosition()); tempMatrix.SetPosition(Vector3f(0.0f, 0.0f, 0.0f)); translation *= -1; translation.w = 1; tempMatrix.Transpose(); translation = translation * tempMatrix; tempMatrix.SetPosition(Vector3f(translation.x, translation.y, translation.z)); return tempMatrix; }
void Camera::Translate(Vector3f aVector) { Matrix44f translationMatrix; translationMatrix.SetPosition(aVector); myTransformation = translationMatrix * myTransformation; }
void PointCloud::Translate(Vector3f aPosition) { Matrix44f translationMatrix; translationMatrix.SetPosition(aPosition); myOffset = translationMatrix; }