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 Vec4i.h
|
|
|
8 |
* @brief 4D integer vector class.
|
|
|
9 |
*/
|
|
|
10 |
|
|
|
11 |
#ifndef __CGLA_VEC4I_H__
|
|
|
12 |
#define __CGLA_VEC4I_H__
|
|
|
13 |
|
|
|
14 |
#include "ArithVec4Int.h"
|
|
|
15 |
|
|
|
16 |
namespace CGLA
|
|
|
17 |
{
|
|
|
18 |
class Vec4f;
|
|
|
19 |
class Vec4uc;
|
|
|
20 |
class Vec4usi;
|
|
|
21 |
|
|
|
22 |
/** \brief 4D integer vector.
|
|
|
23 |
|
|
|
24 |
This class does not really extend the template
|
|
|
25 |
and hence provides only the basic facilities of an ArithVec.
|
|
|
26 |
The class is typically used for indices to 4D voxel grids. */
|
|
|
27 |
class Vec4i: public ArithVec4Int<int,Vec4i>
|
|
|
28 |
{
|
|
|
29 |
public:
|
|
|
30 |
|
|
|
31 |
/// Construct 0 vector.
|
|
|
32 |
Vec4i() {}
|
|
|
33 |
|
|
|
34 |
/// Construct a 4D integer vector.
|
|
|
35 |
Vec4i(int _a,int _b,int _c, int _d): ArithVec4Int<int,Vec4i>(_a,_b,_c,_d) {}
|
|
|
36 |
|
|
|
37 |
/// Construct a 4D integer vector with 4 identical coordinates.
|
|
|
38 |
explicit Vec4i(int a): ArithVec4Int<int,Vec4i>(a,a,a,a) {}
|
|
|
39 |
|
|
|
40 |
/// Construct from a Vec4f.
|
|
|
41 |
explicit Vec4i(const Vec4f& v);
|
|
|
42 |
|
|
|
43 |
/// Construct from a Vec4uc.
|
|
|
44 |
explicit Vec4i(const Vec4uc& v);
|
|
|
45 |
|
|
|
46 |
/// Construct from a Vec4usi.
|
|
|
47 |
explicit Vec4i(const Vec4usi& v);
|
|
|
48 |
|
|
|
49 |
};
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
}
|
|
|
53 |
#endif
|