cams.h 2.6 KB

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