Subversion Repositories gelsvn

Rev

Rev 443 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 443 Rev 595
Line -... Line 1...
-
 
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
/**
-
 
8
 * @file Triangle.h
-
 
9
 * @brief Triangle class for use with bbox hierarchies.
-
 
10
 */
-
 
11
 
1
#ifndef __GEOMETRY_TRIANGLE_H
12
#ifndef __GEOMETRY_TRIANGLE_H
2
#define __GEOMETRY_TRIANGLE_H
13
#define __GEOMETRY_TRIANGLE_H
3
 
14
 
4
#include "CGLA/Vec2f.h"
15
#include "CGLA/Vec2f.h"
5
#include "CGLA/Vec3f.h"
16
#include "CGLA/Vec3f.h"
6
#include "CGLA/Mat3x3f.h"
17
#include "CGLA/Mat3x3f.h"
7
 
18
 
8
#define COMPUTE_SIGN
-
 
9
 
-
 
10
namespace Geometry
19
namespace Geometry
11
{
20
{
12
 
21
 
13
class Triangle
22
class Triangle
14
{
23
{
15
	CGLA::Vec3f vert[3];
24
	CGLA::Vec3f vert[3];
16
	CGLA::Vec3f edge[3];
25
	CGLA::Vec3f edge[3];
17
 
26
 
18
#ifdef COMPUTE_SIGN
-
 
19
	CGLA::Vec3f vert_norm[3];
27
	CGLA::Vec3f vert_norm[3];
20
	CGLA::Vec3f edge_norm[3];
28
	CGLA::Vec3f edge_norm[3];
21
#endif
-
 
22
	CGLA::Vec3f face_norm;
29
	CGLA::Vec3f face_norm;
23
 
30
 
24
	CGLA::Vec3f tri_plane_edge_norm[3];
31
	CGLA::Vec3f tri_plane_edge_norm[3];
25
	float edge_len[3];
32
	float edge_len[3];
26
	
33