CAMERA.H 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /****************************************************************************
  2. * camera.h
  3. *
  4. * This module contains all defines, typedefs, and prototypes for CAMERA.C.
  5. *
  6. * from Persistence of Vision(tm) Ray Tracer
  7. * Copyright 1996,1999 Persistence of Vision Team
  8. *---------------------------------------------------------------------------
  9. * NOTICE: This source code file is provided so that users may experiment
  10. * with enhancements to POV-Ray and to port the software to platforms other
  11. * than those supported by the POV-Ray Team. There are strict rules under
  12. * which you are permitted to use this file. The rules are in the file
  13. * named POVLEGAL.DOC which should be distributed with this file.
  14. * If POVLEGAL.DOC is not available or for more info please contact the POV-Ray
  15. * Team Coordinator by email to team-coord@povray.org or visit us on the web at
  16. * http://www.povray.org. The latest version of POV-Ray may be found at this site.
  17. *
  18. * This program is based on the popular DKB raytracer version 2.12.
  19. * DKBTrace was originally written by David K. Buck.
  20. * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  21. *
  22. *****************************************************************************/
  23. #ifndef CAMERA_H
  24. #define CAMERA_H
  25. /*****************************************************************************
  26. * Global preprocessor defines
  27. ******************************************************************************/
  28. /* Available camera types. [DB 8/94] */
  29. #define PERSPECTIVE_CAMERA 1
  30. #define ORTHOGRAPHIC_CAMERA 2
  31. #define FISHEYE_CAMERA 3
  32. #define ULTRA_WIDE_ANGLE_CAMERA 4
  33. #define OMNIMAX_CAMERA 5
  34. #define PANORAMIC_CAMERA 6
  35. #define CYL_1_CAMERA 7
  36. #define CYL_2_CAMERA 8
  37. #define CYL_3_CAMERA 9
  38. #define CYL_4_CAMERA 10
  39. /*****************************************************************************
  40. * Global typedefs
  41. ******************************************************************************/
  42. typedef struct Camera_Struct CAMERA;
  43. struct Camera_Struct
  44. {
  45. VECTOR Location;
  46. VECTOR Direction;
  47. VECTOR Up;
  48. VECTOR Right;
  49. VECTOR Sky;
  50. VECTOR Look_At; /* Used only to record the user's preference */
  51. DBL Focal_Distance, Aperture; /* ARE 9/92 for focal blur. */
  52. int Blur_Samples; /* ARE 9/92 for focal blur. */
  53. DBL Confidence; /* Probability for confidence test. */
  54. DBL Variance; /* Max. variance for confidence test. */
  55. int Type; /* Camera type. */
  56. DBL Angle; /* Viewing angle. */
  57. TNORMAL *Tnormal; /* Primary ray pertubation. */
  58. };
  59. /*****************************************************************************
  60. * Global variables
  61. ******************************************************************************/
  62. /*****************************************************************************
  63. * Global functions
  64. ******************************************************************************/
  65. void Translate_Camera (CAMERA *Cm, VECTOR Vector);
  66. void Rotate_Camera (CAMERA *Cm, VECTOR Vector);
  67. void Scale_Camera (CAMERA *Cm, VECTOR Vector);
  68. void Transform_Camera (CAMERA *Cm, TRANSFORM *Trans);
  69. CAMERA *Copy_Camera (CAMERA *Old);
  70. CAMERA *Create_Camera (void);
  71. void Destroy_Camera (CAMERA *Cm);
  72. #endif