home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / GRAPHICS / rayshade.lzh / typedefs.h < prev    next >
Text File  |  1990-05-08  |  2KB  |  64 lines

  1. /*
  2.  * typedefs.h
  3.  *
  4.  * Copyright (C) 1989, Craig E. Kolb
  5.  *
  6.  * This software may be freely copied, modified, and redistributed,
  7.  * provided that this copyright notice is preserved on all copies.
  8.  *
  9.  * There is no warranty or other guarantee of fitness for this software,
  10.  * it is provided solely .  Bug reports or fixes may be sent
  11.  * to the author, who may or may not act on them as he desires.
  12.  *
  13.  * You may not include this software in a program or other software product
  14.  * without supplying the source, or without informing the end-user that the
  15.  * source is available for no extra charge.
  16.  *
  17.  * If you modify this software, you should include a notice giving the
  18.  * name of the person performing the modification, the date of modification,
  19.  * and the reason for such modification.
  20.  *
  21.  * $Id: typedefs.h,v 3.0.1.1 90/02/12 13:22:35 craig Exp $
  22.  *
  23.  * $Log:    typedefs.h,v $
  24.  * Revision 3.0.1.1  90/02/12  13:22:35  craig
  25.  * patch4: Added prims field to Object structure.
  26.  * patch4: Object->counter is a pointer when SHAREDMEM is defined.
  27.  * 
  28.  * Revision 3.0  89/10/27  02:06:07  craig
  29.  * Baseline for first official release.
  30.  * 
  31.  */
  32. #include "datatypes.h"
  33. #include "primobj.h"
  34.  
  35. /*
  36.  * Light definition.
  37.  */
  38. typedef struct {
  39.     char type;        /* Light source type */
  40.     Vector pos;        /* Position / direction */
  41.     Color color;        /* Color (always normalized) */
  42.     double radius;        /* Radius (for extended sources) */
  43.     Primitive **cache;
  44.     TransInfo *trans;
  45. } Light;
  46.  
  47. /*
  48.  * Object node definition
  49.  */
  50. typedef struct Object {
  51.     char *name;        /* Object name, if any. */
  52.     char type;        /* Type (grid, list, sphere, cone...) */
  53.     char *data;        /* Pointer to list/grid/primitive */
  54.     Trans *trans;        /* Transformation information */
  55.     double bounds[2][3];    /* Bounding box */
  56.     unsigned long prims;    /* # of primitives, including sub-objects */
  57. #ifdef SHAREDMEM
  58.     unsigned long *counter;
  59. #else
  60.     unsigned long counter;        /* # of last grid checked against */
  61. #endif
  62.     struct Texture *texture;    /* Texture mapping info. */
  63. } Object;
  64.