Subversion Repositories gelsvn

Rev

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