Subversion Repositories gelsvn

Rev

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

Rev 320 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 Vec2i.h
-
 
8
 * @brief 2D int vector class.
-
 
9
 */
-
 
10
 
1
#ifndef __CGLA_VEC2I_H__
11
#ifndef __CGLA_VEC2I_H__
2
#define __CGLA_VEC2I_H__
12
#define __CGLA_VEC2I_H__
3
 
13
 
4
#include "ArithVec.h"
14
#include "ArithVec.h"
5
 
15
 
6
namespace CGLA {
16
namespace CGLA {
7
	class Vec2f;
17
	class Vec2f;
8
 
18
 
9
	/** \brief 2D Integer vector. */
19
	/** \brief 2D Integer vector. */
10
	
20
	
11
	class Vec2i: public ArithVec<int,Vec2i,2>
21
	class Vec2i: public ArithVec<int,Vec2i,2>
12
	{
22
	{
13
	public:
23
	public:
14
		
24
		
15
		/// Construct 0 vector
25
		/// Construct 0 vector
16
		Vec2i() {}
26
		Vec2i() {}
17
 
27
 
18
		/// Construct 2D int vector
28
		/// Construct 2D int vector
19
		Vec2i(int _a,int _b): ArithVec<int,Vec2i,2>(_a,_b) {}
29
		Vec2i(int _a,int _b): ArithVec<int,Vec2i,2>(_a,_b) {}
20
 
30
 
21
		/// Construct a 2D integer vector with two identical coordinates.
31
		/// Construct a 2D integer vector with two identical coordinates.
22
		explicit Vec2i(int a): ArithVec<int,Vec2i,2>(a,a) {}
32
		explicit Vec2i(int a): ArithVec<int,Vec2i,2>(a,a) {}
23
 
33
 
24
		/// Convert from 2D float vector
34
		/// Convert from 2D float vector
25
		explicit Vec2i(const Vec2f& v);
35
		explicit Vec2i(const Vec2f& v);
26
  
36
  
27
	};
37
	};
28
 
38
 
29
}
39
}
30
#endif
40
#endif
31
 
41