1 /*------------------------------------------------------------------
4 XINVADERS 3D - 3d Shoot'em up
5 Copyright (C) 2000 Don Llopis
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 ------------------------------------------------------------------*/
28 typedef struct CAMERASTRUCT CAMERA
;
38 VECTOR4 follow_offset
;
47 /* new camera interface */
49 extern CAMERA
* Camera_new ( void );
50 extern void Camera_delete ( CAMERA
*cam
);
51 extern void Camera_init ( CAMERA
*cam
, float width
, float height
, float fov
);
52 extern void Camera_project_point ( CAMERA
*cam
, long pt
[2] );
53 extern void Camera_project_points ( CAMERA
*cam
, long pts
[], int n
);
54 extern void Camera_transform ( CAMERA
*cam
, VECTOR4 up
, VECTOR4 from
, VECTOR4 at
);
55 extern void Camera_follow_obj ( CAMERA
*cam
, GOBJECT
*obj
);
56 extern void Camera_set_follow_offset ( CAMERA
*cam
, VECTOR4 from
);
57 extern void Camera_update ( CAMERA
*cam
);
61 /* old camera interface */
63 extern void Camera_init ( unsigned int width
, unsigned int height
, float fov
);
64 extern void Camera_project_point ( VECTOR4 a
, int b
[2] );
65 extern void Camera_project_points ( VECTOR4 a
[], int b
[], int n
);
66 extern void Camera_transform ( MATRIX4 r
, VECTOR4 up
, VECTOR4 from
, VECTOR4 at
);