Subversion Repositories gelsvn

Rev

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

Rev 412 Rev 596
Line 11... Line 11...
11
 
11
 
12
 
12
 
13
#include <string>
13
#include <string>
14
#include <GL/glew.h>
14
#include <GL/glew.h>
15
#include <HMesh/Manifold.h>
15
#include <HMesh/Manifold.h>
16
#include <CGLA/Vec3f.h>
16
#include <CGLA/Vec3d.h>
17
#include <GLGraphics/draw.h>
17
#include <GLGraphics/draw.h>
-
 
18
#include <GLGraphics/Console.h>
18
#include <GLGraphics/GLViewController.h>
19
#include <GLGraphics/GLViewController.h>
-
 
20
#include <GLGraphics/ManifoldRenderer.h>
19
#include "harmonics.h"
21
#include "harmonics.h"
20
#include "Renderer.h"
-
 
21
 
22
 
22
extern int WINX;
23
extern int WINX;
23
extern int WINY;
24
extern int WINY;
24
 
25
 
25
class VisObj
26
class VisObj
26
	{
27
	{
27
		std::string file;
28
		std::string file;
28
		GLGraphics::GLViewController view_ctrl;
29
		GLGraphics::GLViewController view_ctrl;
29
		bool create_display_list;
30
		bool create_display_list;
30
		HMesh::Manifold mani;
31
		HMesh::Manifold mani;
-
 
32
		HMesh::Manifold old_mani;
-
 
33
		
31
		Harmonics* harmonics;
34
		Harmonics* harmonics;
32
		ManifoldRenderer* renderer;
35
        GLGraphics::ManifoldRenderer* renderer;
33
		CGLA::Vec3f bsphere_center;
36
		CGLA::Vec3d bsphere_center;
34
		float bsphere_radius;
37
		float bsphere_radius;
35
	public:
38
	public:
36
		VisObj():
39
		VisObj():
37
        file(""), view_ctrl(WINX,WINY, CGLA::Vec3f(0), 1.0), create_display_list(true), harmonics(0) {}
40
        file(""), view_ctrl(WINX,WINY, CGLA::Vec3f(0), 1.0), create_display_list(true), harmonics(0) {}
38
		
41
		
39
		float get_bsphere_radius() const { return bsphere_radius;}
42
		float get_bsphere_radius() const { return bsphere_radius;}
40
		
43
		
41
		HMesh::Manifold& mesh() {return mani;}
44
		HMesh::Manifold& mesh() {return mani;}
42
		
45
		
-
 
46
		void save_old() {old_mani = mani;}
-
 
47
		void restore_old() {mani = old_mani;}
-
 
48
		
43
		GLGraphics::GLViewController& view_control() {return view_ctrl;}
49
		GLGraphics::GLViewController& view_control() {return view_ctrl;}
44
		
50
		
45
		bool reload(std::string _file);
51
		bool reload(std::string _file);
-
 
52
 
-
 
53
		bool add_mesh(std::string _file);
46
		
54
		
47
		void display(const std::string& display_method , bool smooth);
55
		void display(const std::string& display_method , GLGraphics::Console& cs, bool smooth, float gamma);
48
		
56
		
49
		void post_create_display_list()
57
		void post_create_display_list()
50
		{
58
		{
51
			create_display_list = true;
59
			create_display_list = true;
52
		}
60
		}