Subversion Repositories gelsvn

Rev

Rev 5 | Rev 45 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 10
Line 1... Line 1...
1
#ifndef __CGLA_QUATERNION_H__
1
#ifndef __CGLA_QUATERNION_H__
2
#define __CGLA_QUATERNION_H__
2
#define __CGLA_QUATERNION_H__
3
 
3
 
4
#include "CGLA/Vec3f.h"
4
#include "Vec3f.h"
5
#include "CGLA/Vec4f.h"
5
#include "Vec4f.h"
6
#include "CGLA/Mat3x3f.h"
6
#include "Mat3x3f.h"
7
#include "CGLA/Mat4x4f.h"
7
#include "Mat4x4f.h"
8
 
8
 
9
namespace CGLA {
9
namespace CGLA {
10
 
10
 
11
	/** A Quaterinion class. Quaternions are algebraic entities 
11
	/** A Quaterinion class. Quaternions are algebraic entities 
12
			useful for rotation. */
12
			useful for rotation. */
Line 20... Line 20...
20
 
20
 
21
		/// Scalar part of quaternion
21
		/// Scalar part of quaternion
22
		float qw;
22
		float qw;
23
 
23
 
24
		/// Construct 0 quaternion
24
		/// Construct 0 quaternion
25
		Quaternion(): qw(1) {}
25
		Quaternion(): qw(CGLA_INIT_VALUE) {}
26
 
26
 
27
		/// Construct quaternion from vector and scalar
27
		/// Construct quaternion from vector and scalar
28
		Quaternion(const Vec3f _qv, float _qw=1) : 
28
		Quaternion(const Vec3f _qv, float _qw=1) : 
29
			qv(_qv) , qw(_qw) {}
29
			qv(_qv) , qw(_qw) {}
30
 
30