Added set and get methods for Matrixd and Matrixf.

This commit is contained in:
Robert Osfield
2003-09-05 20:52:36 +00:00
parent 5b93250eb0
commit a2834d74d2
2 changed files with 35 additions and 0 deletions

View File

@@ -14,6 +14,8 @@
#include <osg/Quat>
#include <osg/Vec4>
#include <osg/Vec3>
#include <osg/Matrixf>
#include <osg/Matrixd>
#include <math.h>
@@ -24,6 +26,27 @@
using namespace osg;
void Quat::set(const Matrixf& matrix)
{
matrix.get(*this);
}
void Quat::set(const Matrixd& matrix)
{
matrix.get(*this);
}
void Quat::get(Matrixf& matrix) const
{
matrix.set(*this);
}
void Quat::get(Matrixd& matrix) const
{
matrix.set(*this);
}
/// Set the elements of the Quat to represent a rotation of angle
/// (radians) around the axis (x,y,z)
void Quat::makeRotate( float angle,