Subversion Repositories gelsvn

Rev

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