Subversion Repositories gelsvn

Rev

Rev 2 | Rev 306 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 89
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. 
-
 
12
 
11
	/** A 3D double vector. Useful for high precision arithmetic. */
13
	Useful for high precision arithmetic. */
12
 
14
 
13
	class Vec3d: public ArithVec3Float<double,Vec3d>
15
	class Vec3d: public ArithVec3Float<double,Vec3d>
14
	{
16
	{
15
	public:
17
	public:
16
 
18
 
17
		/// Construct 0 vector
19
		/// Construct 0 vector
18
		Vec3d(){}
20
		Vec3d(){}
19
 
21
 
20
		/// Construct vector
22
		/// Construct vector
21
		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) {}
22
 
24
 
23
		/// Construct vector where all coords = a 
25
		/// Construct vector where all coords = a 
24
		explicit Vec3d(double a): 
26
		explicit Vec3d(double a): 
25
			ArithVec3Float<double,Vec3d>(a,a,a) {}
27
			ArithVec3Float<double,Vec3d>(a,a,a) {}
26
 
28
 
27
		/// Convert from int vector
29
		/// Convert from int vector
28
		explicit Vec3d(const Vec3i& v): 
30
		explicit Vec3d(const Vec3i& v): 
29
			ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
31
			ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
30
 
32
 
31
		/// Convert from float vector
33
		/// Convert from float vector
32
		explicit Vec3d(const Vec3f& v): 
34
		explicit Vec3d(const Vec3f& v): 
33
			ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
35
			ArithVec3Float<double,Vec3d>(v[0],v[1],v[2]) {}
34
	};
36
	};
35
 
37
 
36
 
38
 
37
}
39
}
38
#endif
40
#endif
39
 
41