Hi Robert.
I just got stuck on something I been worried about for quite some time
regarding the Math library in osg:
bool Matrix::isIdentity() const
{
return _mat[0][0]==1.0f _mat[0][1]==0.0f
_mat[0][2]==0.0f _mat[0][3]==
0.0f
_mat[1][0]==0.0f
Hi Anders,
The equality test is an exact equality test, same with isIdentity().
One could relax it by adding an epilson to it, but this would not be
an exact equality, so would be better placed in a separate method.
Robert.
On 2/26/07, Anders Backman [EMAIL PROTECTED] wrote:
Hi Robert.
I
Hi,
On Monday 26 February 2007 09:23, Anders Backman wrote:
I just got stuck on something I been worried about for quite some time
regarding the Math library in osg:
bool Matrix::isIdentity() const
{
return _mat[0][0]==1.0f _mat[0][1]==0.0f
_mat[0][2]==0.0f
Sure, I agree, the EPSILON was there for an example, so where the rest of
the macros.
I dont want to introduce a macro with a hard limit into a library, Im just
pointing out that when is an exact float test really appropriate?
An example:
osg::Matrix m1, m2;
m1.makeRotate(osg::PI_2,