Subversion Repositories gelsvn

Rev

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

Rev 403 Rev 457
Line 14... Line 14...
14
#include <HMesh/Manifold.h>
14
#include <HMesh/Manifold.h>
15
#include <LinAlg/Matrix.h>
15
#include <LinAlg/Matrix.h>
16
#include <LinAlg/Vector.h>
16
#include <LinAlg/Vector.h>
17
#include "Renderer.h"
17
#include "Renderer.h"
18
 
18
 
-
 
19
#define USE_SPARSE_MATRIX 1
-
 
20
 
19
 
21
 
20
class Harmonics
22
class Harmonics
21
{
23
{
22
	HMesh::Manifold& mani;
24
	HMesh::Manifold& mani;
23
	
25
	
Line 27... Line 29...
27
	static GLuint prog_P0;
29
	static GLuint prog_P0;
28
	
30
	
29
	std::vector<CGLA::Vec3d> proj;
31
	std::vector<CGLA::Vec3d> proj;
30
	
32
	
31
	LinAlg::CMatrix Q;
33
	LinAlg::CMatrix Q;
-
 
34
	LinAlg::CVector qnorm;
32
	LinAlg::CVector V;
35
	LinAlg::CVector V;
-
 
36
	LinAlg::CVector S;
33
	std::vector<float> max_eig_values;
37
	std::vector<float> max_eig_values;
34
 
38
 
35
	void make_laplace_operator();
39
	void make_laplace_operator();
-
 
40
	void make_laplace_operator_sparse();
36
 
41
 
37
public:
42
public:
38
	
43
	
39
	/// Initialize API (must be called first)
44
	/// Initialize API (must be called first)
40
	static void init();
45
	static void init();
Line 53... Line 58...
53
	
58
	
54
	/// Parse keystrokes that would influence the interactive display
59
	/// Parse keystrokes that would influence the interactive display
55
	void parse_key(unsigned char key);
60
	void parse_key(unsigned char key);
56
	
61
	
57
	/// Draw with eigenvalues
62
	/// Draw with eigenvalues
58
	void draw();
63
	void draw_adf();
59
	
64
	
60
};
65
};
61
 
66
 
62
 
67
 
63
class HarmonicsRenderer: public ManifoldRenderer
68
class HarmonicsRenderer: public ManifoldRenderer
Line 65... Line 70...
65
		
70
		
66
	public:
71
	public:
67
		HarmonicsRenderer(Harmonics* h)
72
		HarmonicsRenderer(Harmonics* h)
68
		{
73
		{
69
			glNewList(display_list,GL_COMPILE);
74
			glNewList(display_list,GL_COMPILE);
70
			if(h) h->draw();
75
			if(h) h->draw_adf();
71
			glEndList();
76
			glEndList();
72
		}
77
		}
73
	};
78
	};
74
 
79
 
75
 
80