This file is indexed.

/usr/include/miaviewit-1.0/viewit/pixel.hh is in libmiaviewit-dev 1.0.5-1.

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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/* -*- mia-c++ -*-
 *
 * This file is part of viewitgui - a library and program for the
 * visualization of 3D data sets. 
 *
 * Copyright (c) Leipzig, Madrid 1999-2013 Mirco Hellmann, Gert Wollny
 *
 * viewitgui 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 3 of the License, or
 * (at your option) any later version.
 *
 * viewitgui 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 viewitgui; if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __pixel_h
#define __pixel_h

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <mia.hh>
using namespace mia; 

#include <GL/gl.h>
#include <viewit/drawable.hh>

#include <queue>

class TCounter {
	size_t crosses; 
	C3DFVector sum_speed; 
	bool counted;
	
public:
	TCounter();
	
	const C3DFVector& get_sum_speed()const;
	
	size_t get_crossings() const; 
	
	bool add_crossing(const C3DFVector& speed);
	
	C3DFVector get_avg_speed() const;
};

typedef C3DFDatafield T3DCounter; 
typedef std::list<C3DBounds> TCollector; 
typedef std::list<C3DFVector> TCriticalLocations; 

class TPixel {
	static float max_time; 
	
	int dead; 
	float remain; 	
	C3DFVector where; 	
public:	
	
	enum TPixelType {pt_unspecified,pt_forward, pt_backward};
	
	TPixel(const C3DFVector& _where);
	static void set_max_time(float _max_time);
	void set_dead_state(int dead_state);
	int get_dead_state() const;
	const C3DFVector& get_where() const; 
	
	virtual void do_move(const C3DFVector& add);
	void move(const C3DFVector& add,float timestep);
	void gl_vertex()const;
	
	virtual TPixelType get_type()const;
	
	TPixel& operator += (const C3DFVector& v);
	TPixel& operator -= (const C3DFVector& v);
protected: 
	void set_color(const C3DFVector& col);
private:	
	
};

class TSpeedPixel {
	float norm; 
	C3DFVector loc; 
public:		
	TSpeedPixel(float _norm, C3DFVector _loc):norm(_norm),loc(_loc){};
	float get_norm()const {return norm;};
	const C3DFVector& get_loc()const {return loc;};
	bool operator < (const TSpeedPixel& b)const {
		return (norm < b.norm); 
	}
};

typedef std::priority_queue<TSpeedPixel> TSpeedPixelQueue;

class TForwardPixel:public TPixel {
public:
	TForwardPixel(const C3DFVector& _where);
	virtual void do_move(const C3DFVector& add);
	virtual TPixelType get_type()const;
};

class TBackwardPixel:public TPixel {
public:
	TBackwardPixel(const C3DFVector& _where);
	virtual void do_move(const C3DFVector& add);
	virtual TPixelType get_type()const;
};

class   TPixelList: public TDrawable {
	
public:	
	typedef std::list<TPixel *> TList;
	TPixelList(const string& name);
	TPixelList(const string& name,const TColor& color); 
	TPixelList(const string& name,const TPixelList& org);
	~TPixelList();
	void clear();
	void do_gl_draw(const TCamera& c) const; 
	const TPixelList::TList& get_list() const;
	TPixelList::TList& get_list();
	void remove_dead_front_pixels();
	void remove_dead_pixels();
	//	virtual void povray_output_object(FILE *f)const{};
	//	virtual void povray_output_attributes(FILE *f)const{};	
private:
	TList *list; 
};



// inline implementations

inline void TPixel::set_dead_state(int dead_state)
{
	dead = dead_state;
}

inline int TPixel::get_dead_state() const
{
	return dead; 
}

inline const C3DFVector& TPixel::get_where() const
{
	return where; 
}


inline TPixel& TPixel::operator  += (const C3DFVector& v)
{
	where += v; 
	return *this;
}
inline TPixel& TPixel::operator  -= (const C3DFVector& v)
{
	where -= v; 
	return *this; 
}

inline void TPixel::gl_vertex()const
{
	glVertex3fv(&where.x);
}

inline const C3DFVector& TCounter::get_sum_speed() const 
{
	return sum_speed;
}
inline size_t TCounter::get_crossings() const 
{
	return crosses; 
}


inline const TPixelList::TList& TPixelList::get_list()const
{
	return *list; 
}

inline TPixelList::TList& TPixelList::get_list()
{
	return *list; 
}

#endif