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