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