This file is indexed.

/usr/include/oglappth/base_app.h is in liboglappth-dev 1.0.0-2ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
// BASE_APP.H : an OpenGL application base class.

// Copyright (C) 2005 Tommi Hassinen.

// This package is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.

// This package is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this package; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

/*################################################################################################*/

//#include "config.h"

#ifndef BASE_APP_H
#define BASE_APP_H

/*################################################################################################*/

#ifdef WIN32
#include <windows.h>	// need to have this before the GL stuff...
#endif	// WIN32

#include <GL/gl.h>
#include <GL/glu.h>

#include <map>
#include <vector>
using namespace std;

/*################################################################################################*/

struct mouseinfo;

class base_app;

#include "base_wnd.h"

#include "ogl_camera.h"
#include "ogl_lights.h"

#include "transparent.h"

/*################################################################################################*/

struct mouseinfo
{
	enum mi_state { sUp, sDown, sUnknown };
	enum mi_button { bLeft, bMiddle, bRight, bNone };
	
	static mi_state state;
	static mi_button button;
	
	static bool shift_down;
	static bool ctrl_down;
	
	static float ang_sensitivity;
	static float dist_sensitivity;
	
	static int latest_x;
	static int latest_y;
};

/*################################################################################################*/

class base_app
{
	private:
	
	static base_app * app;
	
	protected:
	
	vector<ogl_camera *> camera_vector;
	vector<ogl_light *> light_vector;
	
	GLuint glname_counter;			// these are for generating GLuint-type
	map<GLuint, void *> glname_map;		// names for objects (or memory blocks).
	
	vector<transparent_primitive> tp_vector;
	
// friends...
// ^^^^^^^^^^
	friend class ogl_camera;
	
	public:
	
	base_app(void);
	virtual ~base_app(void);
	
	static base_app * GetAppB(void);
	
	// simple messaging methods:
	// ^^^^^^^^^^^^^^^^^^^^^^^^^
	
	virtual void Message(const char *) = 0;
	virtual void WarningMessage(const char *) = 0;
	virtual void ErrorMessage(const char *) = 0;
	virtual bool Question(const char *) = 0;
	
	// some camera/light-related methods:
	// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	
	virtual void AddCamera(ogl_camera *);
	virtual bool RemoveCamera(ogl_camera *);
	
	virtual bool AddGlobalLight(ogl_light *);
	virtual bool AddLocalLight(ogl_light *, ogl_camera *);
	virtual bool RemoveLight(ogl_dummy_object *);
	
	int IsLight(const ogl_dummy_object *);
	
	GLint CountGlobalLights(void);
	GLint CountLocalLights(ogl_camera *);
	
	void SetupLights(ogl_camera *);
	
	void SetGlobalLightNumbers(void);
	void SetLocalLightNumbers(ogl_camera *);
	
	void UpdateLocalLightLocations(ogl_camera *);
	void RenderLights(ogl_camera *);
	
	// OpenGL selection naming methods:
	// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	
	GLuint RegisterGLName(void *);
	void UnregisterGLNameByName(GLuint);
	void UnregisterGLNameByPtr(void *);
	void * FindPtrByGLName(GLuint);
	
	// transparent primitive rendering methods:
	// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	
	bool AddTP(void *, transparent_primitive &);
	void UpdateMPsForAllTPs(void *);
	void RenderAllTPs(ogl_camera *);
	void RemoveAllTPs(void *);
};

/*################################################################################################*/

#endif	// BASE_APP_H

// eof