Camera_Basic stuff

This commit is contained in:
Dander7BD 2014-02-10 13:01:46 +01:00
parent da58165645
commit 800d5d0505
3 changed files with 10 additions and 0 deletions

View File

@ -68,10 +68,18 @@ void Camera_Basic::Rotate( const Float3 &deltaAngularAxis )
this->rotationIsOutOfDate = true;
}
Float3 Camera_Basic::GetNormalOf( const Float3 &axis ) const
{
return WorldAxisOf( this->GetRotation(), axis );
}
const Quaternion & Camera_Basic::GetRotation() const
{
if( this->rotationIsOutOfDate )
{
/*Float4 temp;
::std::fmod( Float4(this->angularAxis, 0.0f) );*/
this->rotation = Rotation( this->angularAxis );
this->rotationIsOutOfDate = false;
}

View File

@ -21,6 +21,7 @@ public:
void Move( const ::Oyster::Math::Float3 &deltaPosition );
void Rotate( const ::Oyster::Math::Float3 &deltaAngularAxis );
::Oyster::Math::Float3 GetNormalOf( const ::Oyster::Math::Float3 &axis ) const;
const ::Oyster::Math::Quaternion & GetRotation() const;
::Oyster::Math::Float3x3 & GetRotationMatrix( ::Oyster::Math::Float3x3 &targetMem ) const;
::Oyster::Math::Float4x4 & GetRotationMatrix( ::Oyster::Math::Float4x4 &targetMem ) const;

View File

@ -331,6 +331,7 @@ namespace Oyster { namespace Math3D //! Oyster's native math library specialized
using ::LinearAlgebra3D::InterpolateOrientation_UsingRigidNlerp;
using ::LinearAlgebra3D::InterpolateOrientation_UsingSlerp;
using ::LinearAlgebra3D::SnapAngularAxis;
using ::LinearAlgebra3D::WorldAxisOf;
} }
#endif