Subversion Repositories gelsvn

Rev

Rev 391 | Rev 403 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 391 Rev 399
1
/*
1
/*
2
 *  harmonics.h
2
 *  harmonics.h
3
 *  GEL
3
 *  GEL
4
 *
4
 *
5
 *  Created by J. Andreas Bærentzen on 01/09/08.
5
 *  Created by J. Andreas Bærentzen on 01/09/08.
6
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
6
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
7
 *
7
 *
8
 */
8
 */
9
 
9
 
-
 
10
#ifndef __MESHEDIT_HARMONICS_H__
-
 
11
#define __MESHEDIT_HARMONICS_H__
-
 
12
 
10
#include <CGLA/Vec3d.h>
13
#include <CGLA/Vec3d.h>
11
#include <HMesh/Manifold.h>
14
#include <HMesh/Manifold.h>
-
 
15
#include <LinAlg/Matrix.h>
-
 
16
#include <LinAlg/Vector.h>
-
 
17
#include <LinAlg/LapackFunc.h>
12
 
18
 
13
class Harmonics
19
class Harmonics
14
{
20
{
15
	HMesh::Manifold& mani;
21
	HMesh::Manifold& mani;
16
	
22
	
17
	int maximum_eigenvalue;
23
	int maximum_eigenvalue;
18
 
24
 
19
	static bool is_initialized;
25
	static bool is_initialized;
20
	static GLuint prog_P0;
26
	static GLuint prog_P0;
21
	
27
	
22
	std::vector<CGLA::Vec3d> proj;
28
	std::vector<CGLA::Vec3d> proj;
23
	
29
	
24
	LinAlg::CMatrix Q;
30
	LinAlg::CMatrix Q;
25
	LinAlg::CVector V;
31
	LinAlg::CVector V;
26
	std::vector<float> max_eig_values;
32
	std::vector<float> max_eig_values;
27
 
33
 
28
	void make_laplace_operator();
34
	void make_laplace_operator();
29
 
35
 
30
public:
36
public:
31
	
37
	
32
	/// Initialize API (must be called first)
38
	/// Initialize API (must be called first)
33
	static void init();
39
	static void init();
34
	
40
	
35
	/// Initial analysis of harmonics (must be called second)
41
	/// Initial analysis of harmonics (must be called second)
36
	Harmonics(HMesh::Manifold& mani);
42
	Harmonics(HMesh::Manifold& mani);
37
	
43
	
38
	/// Add a frequency to mesh reconstruction
44
	/// Add a frequency to mesh reconstruction
39
	void add_frequency(int f, float scale = 1.0f);
45
	void add_frequency(int f, float scale = 1.0f);
40
	
46
	
41
	/// Reset the shape to use 0 eigenvalues
47
	/// Reset the shape to use 0 eigenvalues
42
	void reset_shape();
48
	void reset_shape();
43
	
49
	
44
	/// Do a partial reconstruct with an interval of eigenvalues
50
	/// Do a partial reconstruct with an interval of eigenvalues
45
	void partial_reconstruct(int E0, int E1, float scale=1.0f);
51
	void partial_reconstruct(int E0, int E1, float scale=1.0f);
46
	
52
	
47
	/// Parse keystrokes that would influence the interactive display
53
	/// Parse keystrokes that would influence the interactive display
48
	void parse_key(unsigned char key);
54
	void parse_key(unsigned char key);
49
	
55
	
50
	/// Draw with eigenvalues
56
	/// Draw with eigenvalues
51
	void draw();
57
	void draw();
52
	
58
	
53
};
-
 
54
 
59
};
-
 
60
 
-
 
61
#endif
-
 
62
 
-
 
63
 
55

Generated by GNU Enscript 1.6.6.
-
 
56
 
-
 
57
 
-
 
58
 
-