Subversion Repositories gelsvn

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 bj 1
#ifndef __CGLA_VEC3USI_H__
2
#define __CGLA_VEC3USI_H__
3
 
4
#include "Vec3i.h"
5
 
6
namespace CGLA {
7
	typedef unsigned short int USInt;
8
 
9
	/** Unsigned short int 3D vector class. 
10
			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
	class Vec3usi: public ArithVec3Int<int,Vec3usi>
13
	{
14
 
15
	public:
16
 
17
		/// Construct 0 vector.
18
		Vec3usi() {}
19
 
20
		/// Construct a Vec3usi
21
		Vec3usi(USInt _a, USInt _b, USInt _c): 
22
			ArithVec3Int<int,Vec3usi>(_a,_b,_c) {}
23
 
24
		/// Construct a Vec3usi from a Vec3i. 
25
		explicit Vec3usi(const Vec3i& v): 
26
			ArithVec3Int<int,Vec3usi>(v[0]&0xffff, v[1]&0xffff, v[2]&0xffff) {}
27
	};
28
 
29
 
30
}
31
#endif
32