Subversion Repositories gelsvn

Rev

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

Rev 630 Rev 641
Line 26... Line 26...
26
    HMesh::VertexAttributeVector<int> vtouched;
26
    HMesh::VertexAttributeVector<int> vtouched;
27
	
27
	
28
	int maximum_eigenvalue;
28
	int maximum_eigenvalue;
29
    
29
    
30
    bool is_initialized;
30
    bool is_initialized;
31
    GLuint prog_P0;
-
 
32
	
31
	
33
	std::vector<CGLA::Vec3d> proj;
32
	std::vector<CGLA::Vec3d> proj;
34
	
33
	
35
	LinAlg::CMatrix Q;
34
	LinAlg::CMatrix Q;
36
	LinAlg::CVector qnorm;
35
	LinAlg::CVector qnorm;
37
	LinAlg::CVector V;
36
	LinAlg::CVector V;
38
	LinAlg::CVector S;
37
	LinAlg::CVector S;
39
    
38
    
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
    
-
 
44
	std::vector<float> max_eig_values;
39
	std::vector<float> max_eig_values;
45
    
40
    
46
	void make_laplace_operator();
41
	void make_laplace_operator();
47
	void make_laplace_operator_sparse();
42
	void make_laplace_operator_sparse();
48
    
43
    
49
public:
44
public:
50
	
45
	
51
	/// Initial analysis of harmonics
46
	/// Initial analysis of harmonics
52
	Harmonics(HMesh::Manifold& mani, GLGraphics::Console& cs);
47
	Harmonics(HMesh::Manifold& mani);
53
	
48
	
54
	/// Add a frequency to mesh reconstruction
49
	/// Add a frequency to mesh reconstruction
55
	void add_frequency(int f, float scale = 1.0f);
50
	void add_frequency(int f, float scale = 1.0f);
56
	
51
	
57
	/// Reset the shape to use 0 eigenvalues
52
	/// Reset the shape to use 0 eigenvalues
58
	void reset_shape();
53
	void reset_shape();
59
	
54
	
60
	/// Do a partial reconstruct with an interval of eigenvalues
55
	/// Do a partial reconstruct with an interval of eigenvalues
61
	void partial_reconstruct(int E0, int E1, float scale=1.0f);
56
	void partial_reconstruct(int E0, int E1, float scale=1.0f);
62
	
57
	
63
	/// Parse keystrokes that would influence the interactive display
58
    double compute_adf(HMesh::VertexAttributeVector<double>& adf, double t);
64
	void parse_key(unsigned char key);
-
 
65
	
-
 
66
	/// Draw with eigenvalues
-
 
67
	void draw_adf();
-
 
68
	
59
	
69
};
60
};
70
 
61
 
71
 
62
 
72
class HarmonicsRenderer: public GLGraphics::ManifoldRenderer
63
class HarmonicsRenderer: public GLGraphics::ManifoldRenderer
73
{
64
{
-
 
65
    static GLuint prog_P0;
-
 
66
    static GLGraphics::Console::variable<float> display_harmonics_time;
-
 
67
    static GLGraphics::Console::variable<int> display_harmonics_diffuse;
-
 
68
    static GLGraphics::Console::variable<int> display_harmonics_highlight;
-
 
69
    
-
 
70
    HMesh::Manifold* m;
-
 
71
    Harmonics* h;
-
 
72
   
-
 
73
	/// Draw with eigenvalues
-
 
74
	void draw_adf();
74
    
75
    
75
public:
76
public:
76
    HarmonicsRenderer(Harmonics* h)
77
    HarmonicsRenderer(HMesh::Manifold& _m, Harmonics& _h, GLGraphics::Console& cs);
77
    {
78
 
78
        glNewList(display_list,GL_COMPILE);
79
	/// Parse keystrokes that would influence the interactive display
79
        if(h) h->draw_adf();
80
	void parse_key(unsigned char key);
80
        glEndList();
-
 
81
    }
81
    
82
};
82
};
83
 
83
 
84
 
84
 
85
#endif
85
#endif
86
 
86