Add renderstat to get some info about rendering.

This commit is contained in:
Godzil
2020-02-27 17:20:55 +00:00
parent a4ddfddbf3
commit a6f0422bd1
19 changed files with 194 additions and 12 deletions

View File

@@ -101,6 +101,7 @@ Matrix Matrix::operator*(const Matrix &b) const
return ret;
}
/* TODO: Check if we can optimise this function. It is called a lot */
Tuple Matrix::operator*(const Tuple &b) const
{
return Tuple(b.x * this->get(0, 0) + b.y * this->get(0, 1) + b.z * this->get(0, 2) + b.w * this->get(0, 3),