This file is indexed.

/usr/include/geomview/camera.h is in libgeomview-dev 1.9.4-3.

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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/* Copyright (C) 1992-1998 The Geometry Center
 * Copyright (C) 1998-2000 Stuart Levy, Tamara Munzner, Mark Phillips
 *
 * This file is part of Geomview.
 * 
 * Geomview is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 * 
 * Geomview 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
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with Geomview; see the file COPYING.  If not, write
 * to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
 * USA, or visit http://www.gnu.org.
 */


/* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */

#ifndef CAMERA_H
#define CAMERA_H

#include "3d.h"
#include "handle.h"
#include "color.h"

#include <stdarg.h>

typedef struct Camera Camera;

/* Public Camera methods (more below): */

Camera *CamCreate( int attr1, ... );			
Camera *CamSet( Camera *, int attr1, ... );
Camera * _CamSet(Camera *cam, int attr, va_list *a_list);
int	CamGet( Camera *, int attr, void *value);
void	CamDelete( Camera * );				
Camera *CamCopy( Camera *src, Camera *dst );		
Camera *CamMerge( Camera *src, Camera *dst );

/* Camera attributes: */
				/* Set/Create type	Get type	*/
#define CAM_END		800	/* ---------------	--------	*/
#define CAM_PERSPECTIVE 801	/* int			int *		*/
#define CAM_C2W		802	/* Transform		Transform	*/
#define CAM_W2C		803	/* Transform		Transform	*/
#define CAM_FOV		804	/* float		float *		*/
#define CAM_HALFYFIELD	805	/* float		float *		*/
#define CAM_HALFFIELD	806	/* float		float *		*/
#define CAM_ASPECT	807	/* float		float *		*/
#define CAM_FOCUS	808	/* float		float *		*/
#define CAM_NEAR	809	/* float		float *		*/
#define CAM_FAR		810	/* float		float *		*/
#define CAM_STEREO	811	/* int			int *		*/
#define CAM_STEREOSEP	812	/* float		float *		*/
#define CAM_STEREOANGLE	813	/* float		float *		*/
#define CAM_STEREOEYE	814	/* int			int *		*/
#define	CAM_C2WHANDLE	815	/* Handle *		Handle **	*/
#define	CAM_W2CHANDLE	816	/* Handle *		Handle **	*/
#define CAM_STEREYES	817	/* Transform [2]	Transform [2]	*/
#define	CAM_STERHANDLES	818	/* Handle *[2]		Handle *[2]	*/
#define CAM_SPACE	819	/* int			int *		*/
#define CAM_BGCOLOR     820	/* ColorA *		ColorA *	*/
#define CAM_BGIMAGE     821	/* Image *		Image **	*/
#define CAM_BGIMGHANDLE 822	/* Handle *		Handle **	*/

#define CAM_ABLOCK	899	/* void **ablock */

/*
  CAM_END:		end of attribute list
  CAM_PERSPECTIVE:	perspective (1) or ortho (0) projection (default:1)
  CAM_C2W:		camera-to-world transform: <world> * C2W = <cam>
  CAM_W2C:		world-to-camera transform (inverse of CAM_C2W)
  CAM_C2WHANDLE:	Handle onto CAM_C2W
  CAM_W2CHANDLE:	Handle onto CAM_W2C
  CAM_FOV:		field of view (in degrees)
  CAM_HALFYFIELD:	FOV half-width at z=1 (Y direction)
  CAM_HALFFIELD:	min FOV half-width
  CAM_ASPECT:		aspect ratio, X/Y
  CAM_FOCUS:		nominal focal distance for perspec<->ortho
  CAM_NEAR:		near clipping plane
  CAM_FAR:		far clipping plane
  CAM_STEREO:		stereo (1) or mono (0) (default:0)
  CAM_STEREOSEP:	separation distance between stereo eyes
  CAM_STEREOANGLE:	angle between stereo eyes (degrees)
  CAM_STEREYES:		array of two transforms resp. for left & right eye,
			  applied as <world> * C2W * STEREYE * projection
  CAM_STERHANDLES:	Handles for left and right eye transforms
  CAM_STEREOEYE:	Which stereo eye selected: CAM_LEFT or CAM_RIGHT
  CAM_SPACE:		TM_EUCLIDEAN, TM_HYPERBOLIC, or TM_SPHERICAL
  */

#define	CAM_LEFT	0
#define	CAM_RIGHT	1

/*
 * Additional public Camera methods:
 */

/* Reset to defaults */
void	CamReset( Camera * );			

/*  return Camera's projection xform; doesn't change camera at all */
void	CamViewProjection( Camera *, Transform ); 

/*  Complete cam world->proj xform; doesn't change camera at all */
void	CamView( Camera *, Transform );	

/* Apply T to camtoworld xform */
void	CamTransform( Camera *, Transform T );	

/* Rotate camera about X */
void	CamRotateX( Camera *, float angle );	

/* Rotate about Y (radians) */
void	CamRotateY( Camera *, float );		

/* Rotate about Z */
void	CamRotateZ( Camera *, float );		

/* Translate X,Y,Z */
void	CamTranslate( Camera *, float,float,float );	

/* Hyperbolic xlate */
void	CamHypTranslate( Camera *, float,float,float, float );	

/* Zoom in X,Y,Z */
void	CamScale( Camera *, float,float,float );		

/* ??? */
void	CamAlignZ( Camera *, float,float,float );		

/* Save to file */
void    CamSave(Camera *, char *);
void    CamFSave(Camera *, FILE *, char *);

/* Load from file */
Camera  *CamLoad(Camera *, char *);
Camera  *CamFLoad(Camera *, IOBFILE *, char *);

/************************************************************************
 * The following procedures are on death row; they will be taken out    *
 * soon because they have been superceded by CamGet and CamSet          *
 ************************************************************************/

/* Get object xform */
void	CamCurrentPosition( Camera *, Transform );		

/*  Camera's world->camera xform (inverse of CamCurrentPosition) */
void	CamViewWorld( Camera *, Transform ); 

/* Set "focal" length */
void	CamFocus( Camera *, float focus );			

/* Get focal length */
float	CamCurrentFocus( Camera * );			

/* Set X/Y aspect */
void	CamFrameAspect( Camera *, float aspectratio );	

/* Get X/Y aspect */
float	CamCurrentAspect( Camera * );			

/* camtoworld xform = T */
void	CamTransformTo( Camera *, Transform T );	

/* Left/Right/Mono */
void	CamStereoEye( Camera *cam, int whicheye );		

/* Set clip planes */
void	CamClipping( Camera *, float near, float far );	

/* Get clipping */
void	CamCurrentClipping( Camera *, float *near, float *far ); 

/* Set field: minfov/2 */
void	CamHalfField( Camera *, float halffield );		

/* Set field: Yfov/2 */
void	CamHalfYField( Camera *, float halfyfield );	

/* perspective/ortho */
void	CamPerspective( Camera *, int perspective );	

/* or orthographic */
int	CamIsPerspective( Camera * );			

/* Get fov/2 (max way) */
float	CamCurrentHalfField( Camera * );			

/* Get fov/2 (Y dir) */
float	CamCurrentHalfYField( Camera * );			

/* Get xfms, cur eye */
int	CamCurrentStereo( Camera *, Transform leye, Transform reye );

void CamDefault(Camera *cam);

int CamStreamIn(Pool *p, Handle **hp, Camera **camp);
int CamStreamOut(Pool *p, Handle *hp, Camera *cam);

void CamHandleScan( Camera *cam, int (*func)(), void *arg );

#endif /* !CAMERA_H */