1c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner/* San Angeles Observation OpenGL ES version example
2c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * Copyright 2004-2005 Jetro Lauha
3c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * All rights reserved.
4c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * Web: http://iki.fi/jetro/
5c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *
6c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * This source is free software; you can redistribute it and/or
7c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * modify it under the terms of EITHER:
8c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *   (1) The GNU Lesser General Public License as published by the Free
9c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *       Software Foundation; either version 2.1 of the License, or (at
10c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *       your option) any later version. The text of the GNU Lesser
11c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *       General Public License is included with this source in the
12c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *       file LICENSE-LGPL.txt.
13c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *   (2) The BSD-style license that is included with this source in
14c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *       the file LICENSE-BSD.txt.
15c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *
16c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * This source is distributed in the hope that it will be useful,
17c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * but WITHOUT ANY WARRANTY; without even the implied warranty of
18c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
19c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
20c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner *
21c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * $Id: cams.h,v 1.7 2005/01/31 22:15:15 tonic Exp $
22c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * $Revision: 1.7 $
23c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner */
24c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner
25c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner#ifndef CAMS_H_INCLUDED
26c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner#define CAMS_H_INCLUDED
27c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner
28c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner
29c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner/* Length in milliseconds of one camera track base unit.
30c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner * The value originates from the music synchronization.
31c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner */
32c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner#define CAMTRACK_LEN    5442
33c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner
34c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner
35c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner// Camera track definition for one camera trucking shot.
36c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turnertypedef struct
37c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner{
38c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    /* Five parameters of src[5] and dest[5]:
39c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner     * eyeX, eyeY, eyeZ, viewAngle, viewHeightOffs
40c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner     */
41c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    short src[5], dest[5];
42c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    unsigned char dist;     // if >0, cam rotates around eye xy on dist * 0.1
43c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    unsigned char len;      // length multiplier
44c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner} CAMTRACK;
45c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner
46c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turnerstatic CAMTRACK sCamTracks[] =
47c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner{
48c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 4500, 2700, 100, 70, -30 }, { 50, 50, -90, -100, 0 }, 20, 1 },
49c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { -1448, 4294, 25, 363, 0 }, { -136, 202, 125, -98, 100 }, 0, 1 },
50c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 1437, 4930, 200, -275, -20 }, { 1684, 0, 0, 9, 0 }, 0, 1 },
51c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 1800, 3609, 200, 0, 675 }, { 0, 0, 0, 300, 0 }, 0, 1 },
52c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 923, 996, 50, 2336, -80 }, { 0, -20, -50, 0, 170 }, 0, 1 },
53c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { -1663, -43, 600, 2170, 0 }, { 20, 0, -600, 0, 100 }, 0, 1 },
54c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 1049, -1420, 175, 2111, -17 }, { 0, 0, 0, -334, 0 }, 0, 2 },
55c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 0, 0, 50, 300, 25 }, { 0, 0, 0, 300, 0 }, 70, 2 },
56c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { -473, -953, 3500, -353, -350 }, { 0, 0, -2800, 0, 0 }, 0, 2 },
57c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 191, 1938, 35, 1139, -17 }, { 1205, -2909, 0, 0, 0 }, 0, 2 },
58c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { -1449, -2700, 150, 0, 0 }, { 0, 2000, 0, 0, 0 }, 0, 2 },
59c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 5273, 4992, 650, 373, -50 }, { -4598, -3072, 0, 0, 0 }, 0, 2 },
60c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner    { { 3223, -3282, 1075, -393, -25 }, { 1649, -1649, 0, 0, 0 }, 0, 2 }
61c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner};
62c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner#define CAMTRACK_COUNT (sizeof(camTracks) / sizeof(camTracks[0]))
63c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner
64c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner
65c817c5210e4207908b83faaf08a2c5b95251f871David 'Digit' Turner#endif // !CAMS_H_INCLUDED
66