Subversion Repositories gelsvn

Rev

Rev 89 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 89 Rev 145
1
#ifndef __CGLA_VEC3D_H__
1
#ifndef __CGLA_VEC3D_H__
2
#define __CGLA_VEC3D_H__
2
#define __CGLA_VEC3D_H__
3
 
3
 
4
#include "ArithVec.h"
4
#include "ArithVec.h"
5
#include "Vec3i.h"
5
#include "Vec3i.h"
6
#include "Vec3f.h"
6
#include "Vec3f.h"
7
 
7
 
8
 
8
 
9
namespace CGLA {
9
namespace CGLA {
10
 
10
 
11
	/** \brief A 3D double vector. 
11
	/** \brief A 3D double vector. 
12
 
12
 
13
	Useful for high precision arithmetic. */
13
	Useful for high precision arithmetic. */
14
 
14
 
15
	class Vec3d: public ArithVec3Float<double,Vec3d>
15
	class Vec3d: public ArithVec3Float<double,Vec3d>
16
	{
16
	{
17
	public:
17
	public:
18
 
18
 
19
		/// Construct 0 vector
19
		/// Construct 0 vector
20
		Vec3d(){}
20
		Vec3d(){}
21
 
21
 
22
		/// Construct vector
22
		/// Construct vector
23
		Vec3d(double a, double b, double c): ArithVec3Float<double,Vec3d>(a,b,c) {}
23
		Vec3d(double a, double b, double c): ArithVec3Float<double,Vec3d>(a,b,c) {}
24
 
24
 
25
		/// Construct vector where all coords = a 
25
		/// Construct vector where all coords = a 
26
		explicit Vec3d(double a): 
26
		explicit Vec3d(double a): 
27
			ArithVec3Float<double,Vec3d>(a,a,a) {}
27
			ArithVec3Float<double,Vec3d>(a,a,a) {}
28
 
28
 
29
		/// Convert from int vector
29
		/// Convert from int vector
30
		explicit Vec3d(const Vec3i& v): 
30
		explicit Vec3d(const Vec3i& v): 
31
			ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
31
			ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
32
 
32
 
33
		/// Convert from float vector
33
		/// Convert from float vector
34
		explicit Vec3d(const Vec3f& v): 
34
		explicit Vec3d(const Vec3f& v): 
35
			ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
35
			ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
36
	};
36
	};
37
 
37
 
38
 
38
 
39
}
39
}
40
#endif
40
#endif
41
 
41