Subversion Repositories gelsvn

Rev

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

Rev 595 Rev 630
1
/* ----------------------------------------------------------------------- *
1
/* ----------------------------------------------------------------------- *
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
3
 * Copyright (C) the authors and DTU Informatics
3
 * Copyright (C) the authors and DTU Informatics
4
 * For license and list of authors, see ../../doc/intro.pdf
4
 * For license and list of authors, see ../../doc/intro.pdf
5
 * ----------------------------------------------------------------------- */
5
 * ----------------------------------------------------------------------- */
6
 
6
 
7
/** @file Vec4i.h
7
/** @file Vec4i.h
8
 * @brief 4D integer vector class.
8
 * @brief 4D integer vector class.
9
 */
9
 */
10
 
10
 
11
#ifndef __CGLA_VEC4I_H__
11
#ifndef __CGLA_VEC4I_H__
12
#define __CGLA_VEC4I_H__
12
#define __CGLA_VEC4I_H__
13
 
13
 
14
#include "ArithVec4Int.h"
14
#include "ArithVec4Int.h"
15
 
15
 
16
namespace CGLA 
16
namespace CGLA 
17
{
17
{
18
	class Vec4f;
18
	class Vec4f;
19
	class Vec4uc;
19
	class Vec4uc;
20
	class Vec4usi;
20
	class Vec4usi;
21
 
21
 
22
	/** \brief 4D integer vector. 
22
	/** \brief 4D integer vector. 
23
 
23
 
24
	    This class does not really extend the template
24
	    This class does not really extend the template
25
			and hence provides only the basic facilities of an ArithVec. 
25
			and hence provides only the basic facilities of an ArithVec. 
26
			The class is typically used for indices to 4D voxel grids. */
26
			The class is typically used for indices to 4D voxel grids. */
27
	class Vec4i: public ArithVec4Int<int,Vec4i>
27
	class Vec4i: public ArithVec4Int<int,Vec4i>
28
	{
28
	{
29
	public:
29
	public:
30
  
30
  
31
		/// Construct 0 vector.
31
		/// Construct 0 vector.
32
		Vec4i() {}
32
		Vec4i() {}
33
 
33
 
34
		/// Construct a 4D integer vector.
34
		/// Construct a 4D integer vector.
35
		Vec4i(int _a,int _b,int _c, int _d): ArithVec4Int<int,Vec4i>(_a,_b,_c,_d) {}
35
		Vec4i(int _a,int _b,int _c, int _d): ArithVec4Int<int,Vec4i>(_a,_b,_c,_d) {}
36
 
36
 
37
		/// Construct a 4D integer vector with 4 identical coordinates.
37
		/// Construct a 4D integer vector with 4 identical coordinates.
38
		explicit Vec4i(int a): ArithVec4Int<int,Vec4i>(a,a,a,a) {}
38
		explicit Vec4i(int a): ArithVec4Int<int,Vec4i>(a,a,a,a) {}
39
	
39
	
40
		/// Construct from a Vec4f.
40
		/// Construct from a Vec4f.
41
		explicit Vec4i(const Vec4f& v);
41
		explicit Vec4i(const Vec4f& v);
42
 
42
 
43
		/// Construct from a Vec4uc.
43
		/// Construct from a Vec4uc.
44
		explicit Vec4i(const Vec4uc& v);
44
		explicit Vec4i(const Vec4uc& v);
45
 
45
 
46
		/// Construct from a Vec4usi.
46
		/// Construct from a Vec4usi.
47
		explicit Vec4i(const Vec4usi& v);
47
		explicit Vec4i(const Vec4usi& v);
48
 
48
 
49
	};
49
	};
50
 
50
 
51
 
51
 
52
}
52
}
53
#endif
53
#endif
54
 
54