Subversion Repositories gelsvn

Rev

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

Rev 457 Rev 596
Line 10... Line 10...
10
#ifndef __MESHEDIT_HARMONICS_H__
10
#ifndef __MESHEDIT_HARMONICS_H__
11
#define __MESHEDIT_HARMONICS_H__
11
#define __MESHEDIT_HARMONICS_H__
12
 
12
 
13
#include <CGLA/Vec3d.h>
13
#include <CGLA/Vec3d.h>
14
#include <HMesh/Manifold.h>
14
#include <HMesh/Manifold.h>
-
 
15
#include <HMesh/AttributeVector.h>
15
#include <LinAlg/Matrix.h>
16
#include <LinAlg/Matrix.h>
16
#include <LinAlg/Vector.h>
17
#include <LinAlg/Vector.h>
17
#include "Renderer.h"
18
#include <GLGraphics/ManifoldRenderer.h>
18
 
-
 
19
#define USE_SPARSE_MATRIX 1
19
#include <GLGraphics/Console.h>
20
 
20
 
-
 
21
#define USE_SPARSE_MATRIX 0
21
 
22
 
22
class Harmonics
23
class Harmonics
23
{
24
{
24
	HMesh::Manifold& mani;
25
	HMesh::Manifold& mani;
-
 
26
    HMesh::VertexAttributeVector<int> vtouched;
25
	
27
	
26
	int maximum_eigenvalue;
28
	int maximum_eigenvalue;
27
 
29
 
28
	static bool is_initialized;
30
	static bool is_initialized;
29
	static GLuint prog_P0;
31
	static GLuint prog_P0;
Line 40... Line 42...
40
	void make_laplace_operator_sparse();
42
	void make_laplace_operator_sparse();
41
 
43
 
42
public:
44
public:
43
	
45
	
44
	/// Initialize API (must be called first)
46
	/// Initialize API (must be called first)
45
	static void init();
47
	static void init(GLGraphics::Console& cs);
46
	
48
	
47
	/// Initial analysis of harmonics (must be called second)
49
	/// Initial analysis of harmonics (must be called second)
48
	Harmonics(HMesh::Manifold& mani);
50
	Harmonics(HMesh::Manifold& mani);
49
	
51
	
50
	/// Add a frequency to mesh reconstruction
52
	/// Add a frequency to mesh reconstruction
Line 63... Line 65...
63
	void draw_adf();
65
	void draw_adf();
64
	
66
	
65
};
67
};
66
 
68
 
67
 
69
 
68
class HarmonicsRenderer: public ManifoldRenderer
70
class HarmonicsRenderer: public GLGraphics::ManifoldRenderer
69
	{
71
	{
70
		
72
		
71
	public:
73
	public:
72
		HarmonicsRenderer(Harmonics* h)
74
		HarmonicsRenderer(Harmonics* h)
73
		{
75
		{