Subversion Repositories gelsvn

Rev

Rev 89 | Go to most recent revision | Details | Last modification | View Log | RSS feed

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