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 Vec3uc.h
8
 * @brief 3D unsigned char vector.
9
 */
10
 
2 bj 11
#ifndef __CGLA_VEC3UC_H__
12
#define __CGLA_VEC3UC_H__
13
 
14
#include "Vec3i.h"
15
 
16
namespace CGLA {
17
	typedef unsigned char UChar;
18
 
89 jab 19
	/** \brief 3D unsigned char vector. */
2 bj 20
	class Vec3uc: public ArithVec3Int<UChar,Vec3uc>
21
	{
22
 
23
	public:
24
 
25
		/// Construct 0 vector
26
		Vec3uc() {}
27
 
28
		/// Construct 3D uchar vector
29
		Vec3uc(UChar a, UChar b, UChar c): 
30
			ArithVec3Int<UChar,Vec3uc>(a,b,c) {}
31
 
32
		/// Convert from int vector. 
33
		explicit Vec3uc(const Vec3i& v): 
34
			ArithVec3Int<UChar,Vec3uc>(v[0]&0xff, v[1]&0xff, v[2]&0xff) {}
35
	};
36
 
37
 
38
}
39
#endif
40