Changed the osg::Billboard comution so that it get passed in the current

modelview matrix rathan than an identity matrix, this matrix is then modified
locally.

Changed the osg::Matrix set methods so they are inline.

Added a few useful comments to MemoryManager.cpp to help people understand
the assert's better.
This commit is contained in:
Robert Osfield
2002-04-17 09:48:19 +00:00
parent b76888ffb9
commit e17261c45f
7 changed files with 49 additions and 49 deletions

View File

@@ -12,6 +12,7 @@
#include <string.h>
#include <iostream>
#include <algorithm>
namespace osg {
@@ -37,7 +38,7 @@ class SG_EXPORT Matrix : public Object
virtual ~Matrix() {}
Matrix& operator = (const Matrix& );
int compare(const Matrix& m) const { return memcmp(_mat,m._mat,sizeof(_mat)); }
@@ -56,7 +57,23 @@ class SG_EXPORT Matrix : public Object
void set( float const * const );
inline Matrix& operator = (const Matrix& other)
{
if( &other == this ) return *this;
set((float const * const)(other._mat));
return *this;
}
inline void set(const Matrix& other)
{
set((float const * const)(other._mat));
}
inline void set(float const * const ptr)
{
std::copy(ptr,ptr+16,(float*)(_mat));
}
void set( float a00, float a01, float a02, float a03,
float a10, float a11, float a12, float a13,
float a20, float a21, float a22, float a23,