Subversion Repositories gelsvn

Rev

Rev 596 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 596 Rev 614
Line 24... Line 24...
24
{
24
{
25
	HMesh::Manifold& mani;
25
	HMesh::Manifold& mani;
26
    HMesh::VertexAttributeVector<int> vtouched;
26
    HMesh::VertexAttributeVector<int> vtouched;
27
	
27
	
28
	int maximum_eigenvalue;
28
	int maximum_eigenvalue;
29
 
29
    
30
	static bool is_initialized;
30
    bool is_initialized;
31
	static GLuint prog_P0;
31
    GLuint prog_P0;
32
	
32
	
33
	std::vector<CGLA::Vec3d> proj;
33
	std::vector<CGLA::Vec3d> proj;
34
	
34
	
35
	LinAlg::CMatrix Q;
35
	LinAlg::CMatrix Q;
36
	LinAlg::CVector qnorm;
36
	LinAlg::CVector qnorm;
37
	LinAlg::CVector V;
37
	LinAlg::CVector V;
38
	LinAlg::CVector S;
38
	LinAlg::CVector S;
-
 
39
    
-
 
40
    GLGraphics::Console::variable<float> display_harmonics_time;
-
 
41
    GLGraphics::Console::variable<int> display_harmonics_diffuse;
-
 
42
    GLGraphics::Console::variable<int> display_harmonics_highlight;
-
 
43
    
39
	std::vector<float> max_eig_values;
44
	std::vector<float> max_eig_values;
40
 
45
    
41
	void make_laplace_operator();
46
	void make_laplace_operator();
42
	void make_laplace_operator_sparse();
47
	void make_laplace_operator_sparse();
43
 
48
    
44
public:
49
public:
45
	
50
	
46
	/// Initialize API (must be called first)
-
 
47
	static void init(GLGraphics::Console& cs);
-
 
48
	
-
 
49
	/// Initial analysis of harmonics (must be called second)
51
	/// Initial analysis of harmonics
50
	Harmonics(HMesh::Manifold& mani);
52
	Harmonics(HMesh::Manifold& mani, GLGraphics::Console& cs);
51
	
53
	
52
	/// Add a frequency to mesh reconstruction
54
	/// Add a frequency to mesh reconstruction
53
	void add_frequency(int f, float scale = 1.0f);
55
	void add_frequency(int f, float scale = 1.0f);
54
	
56
	
55
	/// Reset the shape to use 0 eigenvalues
57
	/// Reset the shape to use 0 eigenvalues
Line 66... Line 68...
66
	
68
	
67
};
69
};
68
 
70
 
69
 
71
 
70
class HarmonicsRenderer: public GLGraphics::ManifoldRenderer
72
class HarmonicsRenderer: public GLGraphics::ManifoldRenderer
71
	{
73
{
72
		
74
    
73
	public:
75
public:
74
		HarmonicsRenderer(Harmonics* h)
76
    HarmonicsRenderer(Harmonics* h)
75
		{
77
    {
76
			glNewList(display_list,GL_COMPILE);
78
        glNewList(display_list,GL_COMPILE);
77
			if(h) h->draw_adf();
79
        if(h) h->draw_adf();
78
			glEndList();
80
        glEndList();
79
		}
81
    }
80
	};
82
};
81
 
83
 
82
 
84
 
83
#endif
85
#endif
84
 
86