added Matrix create and destroy

This commit is contained in:
aap
2016-07-25 12:43:19 +02:00
parent 5c3240cce3
commit a391f263cb
2 changed files with 16 additions and 0 deletions
+14
View File
@@ -117,6 +117,20 @@ cross(const V3d &a, const V3d &b)
a.x*b.y - a.y*b.x);
}
Matrix*
Matrix::create(void)
{
Matrix *m = (Matrix*)malloc(sizeof(Matrix));
m->setIdentity();
return m;
}
void
Matrix::destroy(void)
{
free(this);
}
/* q must be normalized */
Matrix
Matrix::makeRotation(const Quat &q)