Subversion Repositories gelsvn

Rev

Rev 320 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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