Subversion Repositories gelsvn

Rev

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

Rev 492 Rev 594
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 draw.h
-
 
9
 * @brief Draw various GEL entities.
-
 
10
 */
-
 
11
 
1
#ifndef __GLGRAPHICS_DRAW_H_
12
#ifndef __GLGRAPHICS_DRAW_H_
2
#define __GLGRAPHICS_DRAW_H_
13
#define __GLGRAPHICS_DRAW_H_
3
 
14
 
4
#include "Geometry/TriMesh.h"
15
#include "Geometry/TriMesh.h"
5
#include "Geometry/AABox.h"
16
#include "Geometry/AABox.h"
6
#include "Geometry/OBox.h"
17
#include "Geometry/OBox.h"
7
#include "Geometry/BoundingINode.h"
18
#include "Geometry/BoundingINode.h"
8
#include "Geometry/BoundingLNode.h"
19
#include "Geometry/BoundingLNode.h"
9
#include "Geometry/BoundingTree.h"
20
#include "Geometry/BoundingTree.h"
-
 
21
 
-
 
22
namespace HMesh
-
 
23
{
10
#include "HMesh/Manifold.h"
24
    class Manifold;
-
 
25
}
11
 
26
 
12
namespace GLGraphics
27
namespace GLGraphics
13
{
28
{
14
	/// Draw an indexed face set (just a triangle list) with normals computed on the fly.
29
	/// Draw an indexed face set (just a triangle list) with normals computed on the fly.
15
	void draw(const Geometry::IndexedFaceSet& geometry);
30
	void draw(const Geometry::IndexedFaceSet& geometry);
Line 19... Line 34...
19
	
34
	
20
	/// Load textures if available
35
	/// Load textures if available
21
	void load_textures(Geometry::TriMesh& tm);	
36
	void load_textures(Geometry::TriMesh& tm);	
22
	
37
	
23
	/// Draw a HMesh Manifold. Inefficient and should be compiled into display list
38
	/// Draw a HMesh Manifold. Inefficient and should be compiled into display list
24
	void draw(HMesh::Manifold& m, bool per_vertex_norms=true);
39
	void draw(const HMesh::Manifold& m, bool per_vertex_norms=true);
25
 
40
 
26
	
41
	
27
	/// Draw an axis aligned bounding box
42
	/// Draw an axis aligned bounding box
28
	void draw(const Geometry::AABox& box);
43
	void draw(const Geometry::AABox& box);
29
	
44
	
Line 34... Line 49...
34
	template<typename T>
49
	template<typename T>
35
	inline void draw_triangles_in_wireframe(T& m, bool per_vertex_norms, const CGLA::Vec3f& line_color);
50
	inline void draw_triangles_in_wireframe(T& m, bool per_vertex_norms, const CGLA::Vec3f& line_color);
36
 
51
 
37
  /// Draw an object of type T as wireframe.  In practice T = Manifold or TriMesh.
52
  /// Draw an object of type T as wireframe.  In practice T = Manifold or TriMesh.
38
	template<class T>
53
	template<class T>
39
	void draw_wireframe_oldfashioned(T& m, bool per_vertex_norms, const CGLA::Vec3f& line_color);
54
	void draw_wireframe_oldfashioned(const T& m, bool per_vertex_norms, const CGLA::Vec3f& line_color);
40
	
55
	
41
	
56
	
42
	template<class BoxType>
57
	template<class BoxType>
43
	void draw(const Geometry::BoundingINode<BoxType>& node, int level, int max_level);
58
	void draw(const Geometry::BoundingINode<BoxType>& node, int level, int max_level);
44
	template<class BoxType>
59
	template<class BoxType>