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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user