Subversion Repositories gelsvn

Rev

Rev 89 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 89 Rev 595
-
 
1
/* ----------------------------------------------------------------------- *
-
 
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
-
 
3
 * Copyright (C) the authors and DTU Informatics
-
 
4
 * For license and list of authors, see ../../doc/intro.pdf
-
 
5
 * ----------------------------------------------------------------------- */
-
 
6
 
-
 
7
/** @file Vec3usi.h
-
 
8
 * @brief 3D unsigned short integer vector class.
-
 
9
 */
-
 
10
 
1
#ifndef __CGLA_VEC3USI_H__
11
#ifndef __CGLA_VEC3USI_H__
2
#define __CGLA_VEC3USI_H__
12
#define __CGLA_VEC3USI_H__
3
 
13
 
4
#include "Vec3i.h"
14
#include "Vec3i.h"
5
 
15
 
6
namespace CGLA {
16
namespace CGLA {
7
	typedef unsigned short int USInt;
17
	typedef unsigned short int USInt;
8
 
18
 
9
	/** \brief Unsigned short int 3D vector class. 
19
	/** \brief Unsigned short int 3D vector class. 
10
 
20
 
11
			This class is mainly useful if we need a 3D int vector that takes up
21
			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. */
22
			less room than a Vec3i but holds larger numbers than a Vec3c. */
13
	class Vec3usi: public ArithVec3Int<int,Vec3usi>
23
	class Vec3usi: public ArithVec3Int<int,Vec3usi>
14
	{
24
	{
15
 
25
 
16
	public:
26
	public:
17
 
27
 
18
		/// Construct 0 vector.
28
		/// Construct 0 vector.
19
		Vec3usi() {}
29
		Vec3usi() {}
20
 
30
 
21
		/// Construct a Vec3usi
31
		/// Construct a Vec3usi
22
		Vec3usi(USInt _a, USInt _b, USInt _c): 
32
		Vec3usi(USInt _a, USInt _b, USInt _c): 
23
			ArithVec3Int<int,Vec3usi>(_a,_b,_c) {}
33
			ArithVec3Int<int,Vec3usi>(_a,_b,_c) {}
24
 
34
 
25
		/// Construct a Vec3usi from a Vec3i. 
35
		/// Construct a Vec3usi from a Vec3i. 
26
		explicit Vec3usi(const Vec3i& v): 
36
		explicit Vec3usi(const Vec3i& v): 
27
			ArithVec3Int<int,Vec3usi>(v[0]&0xffff, v[1]&0xffff, v[2]&0xffff) {}
37
			ArithVec3Int<int,Vec3usi>(v[0]&0xffff, v[1]&0xffff, v[2]&0xffff) {}
28
	};
38
	};
29
 
39
 
30
 
40
 
31
}
41
}
32
#endif
42
#endif
33
 
43
 
34
 
44