home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / libray / libcommon / expr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-09  |  1.7 KB  |  61 lines

  1. /*
  2.  * expr.h
  3.  *
  4.  * Copyright (C) 1989, 1991, Craig E. Kolb, Rod G. Bogart
  5.  * All rights reserved.
  6.  *
  7.  * This software may be freely copied, modified, and redistributed
  8.  * provided that this copyright notice is preserved on all copies.
  9.  *
  10.  * You may not distribute this software, in whole or in part, as part of
  11.  * any commercial product without the express consent of the authors.
  12.  * 
  13.  * There is no warranty or other guarantee of fitness of this software
  14.  * for any purpose.  It is provided solely "as is".
  15.  *
  16.  * expr.h,v 4.1 1994/08/09 07:54:50 explorer Exp
  17.  *
  18.  * expr.h,v
  19.  * Revision 4.1  1994/08/09  07:54:50  explorer
  20.  * Bump version to 4.1
  21.  *
  22.  * Revision 1.1.1.1  1994/08/08  04:52:01  explorer
  23.  * Initial import.  This is a prerelease of 4.0.6enh3, or 4.1 possibly.
  24.  *
  25.  * Revision 4.0  91/07/17  14:30:47  kolb
  26.  * Initial version.
  27.  * 
  28.  */
  29. #ifndef EXPR_H
  30. #define EXPR_H
  31.  
  32. #define FLOAT_EXPR        0
  33. #define BUILTIN_EXPR        1
  34.  
  35. typedef struct Expr {
  36.     short    type,            /* Expr type (float/builtin/time) */
  37.         timevary,        /* does the expr vary over time? */
  38.         symtab,            /* is the expr in the symtab? */
  39.         nparams;        /* # of params, if builtin */
  40.     Float    value,            /* float val/last eval if timeexpr */
  41.         timenow,        /* time of last evaluation */
  42.         (*function)();
  43.     struct Expr **params;        /* parameters, if a builtin */
  44. } Expr;
  45.  
  46. typedef struct ExprAssoc {
  47.     Float *lhs;            /* left-hand side */
  48.     Expr *expr;            /* right-hand side */
  49.     struct ExprAssoc *next;        /* Next in list */
  50. } ExprAssoc;
  51.     
  52. extern Float    ExprEval();
  53.  
  54. extern Expr    *ExprResolve1(), *ExprResolve2(), *ExprResolve3(),
  55.         *ExprResolve4(), *ExprResolve5(), *ExprFloatCreate();
  56. extern Expr    *TimeExpr, *FrameExpr, *ExprReuseFloatCreate();
  57.  
  58. extern ExprAssoc *AssocCreate();
  59.  
  60. #endif /* EXPR_H */
  61.