PATTERN.H 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /****************************************************************************
  2. * pattern.h
  3. *
  4. * This module contains all defines, typedefs, and prototypes for PATTERN.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. /* NOTE: FRAME.H contains other pattern stuff. */
  24. #ifndef PATTERN_H
  25. #define PATTERN_H
  26. /*****************************************************************************
  27. * Global preprocessor defines
  28. ******************************************************************************/
  29. #define NO_PATTERN 0
  30. #define PLAIN_PATTERN 1
  31. #define AVERAGE_PATTERN 2
  32. #define BITMAP_PATTERN 3
  33. #define LAST_SPECIAL_PATTERN BITMAP_PATTERN
  34. /* These former normal patterns require special handling. They too
  35. must be kep seperate for now.*/
  36. #define WAVES_PATTERN 4
  37. #define RIPPLES_PATTERN 5
  38. #define WRINKLES_PATTERN 6
  39. #define BUMPS_PATTERN 7
  40. #define QUILTED_PATTERN 8
  41. #define DENTS_PATTERN 9
  42. #define LAST_NORM_ONLY_PATTERN DENTS_PATTERN
  43. /* These patterns return integer values. They must be kept
  44. together in the list. Any new integer functions added must be added
  45. here and the list renumbered. */
  46. #define CHECKER_PATTERN 10
  47. #define BRICK_PATTERN 11
  48. #define HEXAGON_PATTERN 12
  49. #define LAST_INTEGER_PATTERN HEXAGON_PATTERN
  50. /* These patterns return float values. They must be kept together
  51. and seperate from those above. */
  52. #define BOZO_PATTERN 13
  53. #define MARBLE_PATTERN 14
  54. #define WOOD_PATTERN 15
  55. #define SPOTTED_PATTERN 16
  56. #define AGATE_PATTERN 17
  57. #define GRANITE_PATTERN 18
  58. #define GRADIENT_PATTERN 19
  59. #define ONION_PATTERN 20
  60. #define LEOPARD_PATTERN 21
  61. #define MANDEL_PATTERN 22
  62. #define RADIAL_PATTERN 23
  63. #define CRACKLE_PATTERN 24
  64. #define SPIRAL1_PATTERN 25
  65. #define SPIRAL2_PATTERN 26
  66. #define PLANAR_PATTERN 27
  67. #define SPHERICAL_PATTERN 28
  68. #define BOXED_PATTERN 29
  69. #define CYLINDRICAL_PATTERN 30
  70. #define DENSITY_FILE_PATTERN 31
  71. /* Pattern flags */
  72. #define NO_FLAGS 0
  73. #define HAS_FILTER 1
  74. #define FULL_BLOCKING 2
  75. #define POST_DONE 4
  76. #define Destroy_Turb(t) if ((t)!=NULL) POV_FREE(t);
  77. #define RAMP_WAVE 0
  78. #define SINE_WAVE 1
  79. #define TRIANGLE_WAVE 2
  80. #define SCALLOP_WAVE 3
  81. #define CUBIC_WAVE 4
  82. #define POLY_WAVE 5
  83. /* Interpolation types. */
  84. #define NO_INTERPOLATION 0
  85. #define TRILINEAR_INTERPOLATION 1
  86. /*****************************************************************************
  87. * Global typedefs
  88. ******************************************************************************/
  89. /*****************************************************************************
  90. * Global variables
  91. ******************************************************************************/
  92. /*****************************************************************************
  93. * Global constants
  94. ******************************************************************************/
  95. /*****************************************************************************
  96. * Global functions
  97. ******************************************************************************/
  98. DBL Evaluate_TPat (TPATTERN *TPat, VECTOR EPoint);
  99. void Init_TPat_Fields (TPATTERN *Tpat);
  100. void Copy_TPat_Fields (TPATTERN *New, TPATTERN *Old);
  101. void Destroy_TPat_Fields (TPATTERN *Tpat);
  102. void Translate_Tpattern (TPATTERN *Tpattern, VECTOR Vector);
  103. void Rotate_Tpattern (TPATTERN *Tpattern, VECTOR Vector);
  104. void Scale_Tpattern (TPATTERN *Tpattern, VECTOR Vector);
  105. void Transform_Tpattern (TPATTERN *Tpattern, TRANSFORM *Trans);
  106. DBL quilt_cubic (DBL t,DBL p1,DBL p2);
  107. void Search_Blend_Map (DBL value,BLEND_MAP *Blend_Map,
  108. BLEND_MAP_ENTRY **Prev, BLEND_MAP_ENTRY **Cur);
  109. DENSITY_FILE *Create_Density_File (void);
  110. DENSITY_FILE *Copy_Density_File (DENSITY_FILE *);
  111. void Destroy_Density_File (DENSITY_FILE *);
  112. void Read_Density_File (DENSITY_FILE *df);
  113. #endif