home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / RTrace 1.0 / source / data.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-28  |  4.2 KB  |  121 lines  |  [TEXT/KAHL]

  1. /*
  2.  * Copyright (c) 1988, 1992 Antonio Costa, INESC-Norte.
  3.  * All rights reserved.
  4.  *
  5.  * This code received contributions from the following people:
  6.  *
  7.  *  Roman Kuchkuda      - basic ray tracer
  8.  *  Mark VandeWettering - MTV ray tracer
  9.  *  Augusto Sousa       - overall, shading model
  10.  *  Paul Strauss        - shading model
  11.  *
  12.  * Redistribution and use in source and binary forms are permitted
  13.  * provided that the above copyright notice and this paragraph are
  14.  * duplicated in all such forms and that any documentation,
  15.  * advertising materials, and other materials related to such
  16.  * distribution and use acknowledge that the software was developed
  17.  * by Antonio Costa, at INESC-Norte. The name of the author and
  18.  * INESC-Norte may not be used to endorse or promote products derived
  19.  * from this software without specific prior written permission.
  20.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  21.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  22.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  23.  */
  24. #include "defs.h"
  25.  
  26. /**********************************************************************
  27.  *    RAY TRACING - Data - Version 7.3.1                              *
  28.  *                                                                    *
  29.  *    MADE BY    : Antonio Costa, INESC-Norte, October 1988           *
  30.  *    ADAPTED BY : Antonio Costa, INESC-Norte, June 1989              *
  31.  *    MODIFIED BY: Antonio Costa, INESC-Norte, July 1992              *
  32.  **********************************************************************/
  33.  
  34. /***** Global Variables *****/
  35. short int       antialiasing_mode;
  36. short int       view_mode;
  37. short int       texture_mode;
  38. short int       light_mode;
  39. short int       last_shade_level;
  40. short int       background_mode;
  41. short int       sampling_levels;
  42. short int       sampling_divisions;
  43. short int       sampling_weight;
  44. short int       cluster_size;
  45. short int       ambient_sample_rays;
  46. short int       last_ambient_level;
  47. short int       distributed_cache_mode;
  48. short int       distributed_cache_repetitions;
  49. short int       intersect_mode;
  50. short int       intersect_adjust_mode;
  51. short int       jittering_mode;
  52. short int       raw_mode;
  53. short int       normal_mode;
  54. short int       normal_check_mode;
  55. short int       shade_mode;
  56. short int       output_format;
  57. short int       verbose_mode;
  58. int             objects;        /* Number of Objects         */
  59. short int       lights;         /* Number of Light sources   */
  60. short int       surfaces;       /* Number of Surfaces        */
  61. short int       screen_size_x, screen_size_y;   /* Screen dimensions */
  62. short int       shade_level, shade_level_max;
  63. short int       pqueue_size;
  64. short int       ray_node;
  65.  
  66. real            gaze_distance, light_distance;
  67. real            pixel_distance, threshold_distance;
  68. real            view_angle_x, view_angle_y;     /* View field angles */
  69. real            threshold_level, threshold_color, threshold_vector;
  70. real            focal_aperture, focal_distance;
  71. real            stereo_separation;
  72.  
  73. real            eye_rays, reflected_rays, refracted_rays, shadow_rays;
  74. real            ambient_rays;
  75. real            shadow_hits, shadow_cache_hits;
  76. real            octant_tests, bound_tests, sphere_tests, box_tests,
  77.                 patch_tests, cone_tests, polygon_tests,
  78.                 triangle_tests, text_tests, csg_tests, list_tests;
  79. real            pqueue_resets, pqueue_insertions, pqueue_extractions;
  80. real            ray_hits, ray_cache_resets, ray_cache_hits;
  81. real            distributed_cache_resets, distributed_cache_hits;
  82. real            pixel_divisions;
  83.  
  84. rgb_struct      back_color,     /* Background color */
  85.                 light_ambient;  /* Ambient lighting */
  86.  
  87. xyz_struct      eye, look, up, gaze, screen_x, screen_y;
  88.  
  89. int             ray_cache[RAY_SIZE_MAX];
  90.  
  91. object_ptr     *object;
  92.  
  93. surface_ptr    *surface;
  94.  
  95.  
  96. #ifdef THINK_C
  97.  
  98. /* On the mac, these are allocated dynamically from the mac segment */
  99.  
  100. rgb_struct        *true_color;
  101. real            *back_mask;
  102.  
  103. #else
  104.  
  105. rgb_struct      true_color[SCREEN_SIZE_X_MAX];
  106.  
  107. real            back_mask[SCREEN_SIZE_X_MAX];
  108.  
  109. #endif
  110.  
  111. file_ptr        scene, picture, results, background, raw_picture;
  112.  
  113. light_struct    light[LIGHTS_MAX];
  114.  
  115. pqueue_struct  *pqueue;
  116.  
  117. pixel_ptr       new_line, old_line;
  118.  
  119. wave_struct     wave;
  120.  
  121.