Subversion Repositories gelsvn

Rev

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