Subversion Repositories gelsvn

Rev

Rev 89 | 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 Vec2f.h
8
 * @brief 2D float vector class.
9
 */
10
 
2 bj 11
#ifndef __CGLA_VEC2F_H__
12
#define __CGLA_VEC2F_H__
13
 
14
#include "ArithVec2Float.h"
15
#include "Vec2i.h"
16
 
17
 
18
namespace CGLA {
19
 
89 jab 20
	/** \brief 2D floating point vector */
2 bj 21
 
22
	class Vec2f: public ArithVec2Float<float,Vec2f>
23
	{
24
	public:
25
 
26
		Vec2f() {}
27
		Vec2f(float _a,float _b): ArithVec2Float<float,Vec2f>(_a,_b) {}
28
 
45 jab 29
		template<class T, class V, unsigned int N>
2 bj 30
		explicit Vec2f(const ArithVec<T,V,N>& v): 
31
			ArithVec2Float<float,Vec2f>(static_cast<float>(v[0]),
32
																	static_cast<float>(v[1])) {}
33
 
34
		explicit Vec2f(float a): ArithVec2Float<float,Vec2f>(a,a) {}
35
	};
36
 
37
 
38
 
39
}
40
#endif