Modified the Matrix multiple method added by Don so it is safer and added comments explaining why it shouldn't be needed as other more efficient methods should be doing the work for us.

Also added Matrix::ensureRealized() to support the lazy initialization of Matrix, whilest keeping the implementation robust so that external calls to Matrix which get values do so on an initialized matrix.
This commit is contained in:
Robert Osfield
2001-09-29 09:37:43 +00:00
parent 4ba58ca29b
commit 8e2f1bdb72
2 changed files with 26 additions and 89 deletions

View File

@@ -105,6 +105,8 @@ void Matrix::setTrans( float tx, float ty, float tz )
#ifdef WARN_DEPRECATED
notify(NOTICE) << "Matrix::setTrans is deprecated."<<endl;
#endif
ensureRealized();
_mat[3][0] = tx;
_mat[3][1] = ty;
_mat[3][2] = tz;