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
#include "Vec3i.h"
7
#include "Vec3i.h"
8
#include "Vec3f.h"
8
#include "Vec3f.h"
9
#include "Vec3d.h"
9
#include "Vec3d.h"
10
#include "Vec3uc.h"
10
#include "Vec3uc.h"
11
 
11
 
12
namespace CGLA {
12
namespace CGLA {
13
 
13
 
14
	Vec3i::Vec3i(const Vec3f& v):
14
	Vec3i::Vec3i(const Vec3f& v):
15
    ArithVec3Int<int,Vec3i>(int(floor(v[0])),
15
    ArithVec3Int<int,Vec3i>(int(floor(v[0])),
16
                            int(floor(v[1])),
16
                            int(floor(v[1])),
17
                            int(floor(v[2]))) {}
17
                            int(floor(v[2]))) {}
18
 
18
 
19
	Vec3i::Vec3i(const Vec3d& v):
19
	Vec3i::Vec3i(const Vec3d& v):
20
    ArithVec3Int<int,Vec3i>(int(floor(v[0])),
20
    ArithVec3Int<int,Vec3i>(int(floor(v[0])),
21
                            int(floor(v[1])),
21
                            int(floor(v[1])),
22
                            int(floor(v[2]))) {}
22
                            int(floor(v[2]))) {}
23
 
23
 
24
	Vec3i::Vec3i(const Vec3uc& v): 
24
	Vec3i::Vec3i(const Vec3uc& v): 
25
		ArithVec3Int<int,Vec3i>(v[0],v[1],v[2]) {}
25
		ArithVec3Int<int,Vec3i>(v[0],v[1],v[2]) {}
26
 
26
 
27
	Vec3i::Vec3i(const Vec3usi& v): 
27
	Vec3i::Vec3i(const Vec3usi& v): 
28
		ArithVec3Int<int,Vec3i>(v[0],v[1],v[2]) {}
28
		ArithVec3Int<int,Vec3i>(v[0],v[1],v[2]) {}
29
}
29
}
30
 
30