Subversion Repositories gelsvn

Rev

Rev 2 | 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_VEC3USI_H__
1
#ifndef __CGLA_VEC3USI_H__
2
#define __CGLA_VEC3USI_H__
2
#define __CGLA_VEC3USI_H__
3
 
3
 
4
#include "Vec3i.h"
4
#include "Vec3i.h"
5
 
5
 
6
namespace CGLA {
6
namespace CGLA {
7
	typedef unsigned short int USInt;
7
	typedef unsigned short int USInt;
8
 
8
 
9
	/** Unsigned short int 3D vector class. 
9
	/** \brief Unsigned short int 3D vector class. 
-
 
10
 
10
			This class is mainly useful if we need a 3D int vector that takes up
11
			This class is mainly useful if we need a 3D int vector that takes up
11
			less room than a Vec3i but holds larger numbers than a Vec3c. */
12
			less room than a Vec3i but holds larger numbers than a Vec3c. */
12
	class Vec3usi: public ArithVec3Int<int,Vec3usi>
13
	class Vec3usi: public ArithVec3Int<int,Vec3usi>
13
	{
14
	{
14
 
15
 
15
	public:
16
	public:
16
 
17
 
17
		/// Construct 0 vector.
18
		/// Construct 0 vector.
18
		Vec3usi() {}
19
		Vec3usi() {}
19
 
20
 
20
		/// Construct a Vec3usi
21
		/// Construct a Vec3usi
21
		Vec3usi(USInt _a, USInt _b, USInt _c): 
22
		Vec3usi(USInt _a, USInt _b, USInt _c): 
22
			ArithVec3Int<int,Vec3usi>(_a,_b,_c) {}
23
			ArithVec3Int<int,Vec3usi>(_a,_b,_c) {}
23
 
24
 
24
		/// Construct a Vec3usi from a Vec3i. 
25
		/// Construct a Vec3usi from a Vec3i. 
25
		explicit Vec3usi(const Vec3i& v): 
26
		explicit Vec3usi(const Vec3i& v): 
26
			ArithVec3Int<int,Vec3usi>(v[0]&0xffff, v[1]&0xffff, v[2]&0xffff) {}
27
			ArithVec3Int<int,Vec3usi>(v[0]&0xffff, v[1]&0xffff, v[2]&0xffff) {}
27
	};
28
	};
28
 
29
 
29
 
30
 
30
}
31
}
31
#endif
32
#endif
32
 
33
 
33
 
34