File: glcviewport.h

package info (click to toggle)
freespace2 3.7.4%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: buster
  • size: 22,236 kB
  • sloc: cpp: 393,535; ansic: 4,106; makefile: 1,091; xml: 181; sh: 137
file content (61 lines) | stat: -rw-r--r-- 1,318 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef _GLCVIEWPORT_H
#define _GLCVIEWPORT_H
/*
 * Created by Ian "Goober5000" Warfield and "z64555" for the FreeSpace2 Source 
 * Code Project.
 *
 * You may not sell or otherwise commercially exploit the source or things you
 * create based on the source.
 */

#include "base/wxfred_base.h"

#include "globalincs/pstypes.h"
#include "physics/physics.h"

#include "wx/glcanvas.h"


#if !wxUSE_GLCANVAS
    #error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"
#endif

enum cmode
{
	cmode_standard,	// Standard camera movement controls
	cmode_orbit,	// Camera orbits select object(s)
	cmode_ship		// Controls selected object
};

class glcViewport : public wxGLCanvas
{
public:
	glcViewport( wxWindow *parent, wxWindowID id = wxID_ANY, int*gl_attrib = NULL);

protected:
	// Handlers for glcViewport
	void OnPaint( wxPaintEvent& event );
	void OnSize( wxSizeEvent& event);
	void OnEraseBackgroun( wxEraseEvent& event);

	void OnMouse( wxMouseEvent& event );
private:
	// Member data
	vec3d	c_pos;	// Camera Position
	matrix	c_rot;	// Camera Rotation/Orientation

	// Viewport modes and options
	cmode Control_mode;

	bool show_coordinates;
	bool show_distances;
	bool show_grid;
	bool show_grid_aa;
	bool show_grid_positions;
	bool show_horizon;
	bool show_outlines;


};

#endif // _GLCVIEWPORT_H