home *** CD-ROM | disk | FTP | other *** search
/ Learn 3D Graphics Programming on the PC / Learn_3D_Graphics_Programming_on_the_PC_Ferraro.iso / rwwin / rtramp.h_ / rtramp.bin
Text File  |  1995-11-14  |  2KB  |  64 lines

  1. #if !defined(_RTRAMP_H)
  2. #define _RTRAMP_H
  3.  
  4. /*********************************************************************
  5.  *
  6.  * File:     rtramp.h
  7.  *
  8.  * Abstract: Simple module to assist with generating custom ramps
  9.  *           for RenderWare smooth shading.
  10.  *
  11.  * Author:   Colin McCartney
  12.  *
  13.  * Date:     02/03/95
  14.  *
  15.  *********************************************************************/
  16.  
  17. /*********************************************************************
  18.  *
  19.  * Include files.
  20.  *
  21.  *********************************************************************/
  22.  
  23. #include <rwlib.h>
  24.  
  25. /*********************************************************************
  26.  *
  27.  * Constant Definitions.
  28.  *
  29.  *********************************************************************/
  30.  
  31. #define MAXLUM 23
  32.  
  33. /*********************************************************************
  34.  *
  35.  * Type Definitions.
  36.  *
  37.  *********************************************************************/
  38.  
  39. typedef unsigned char RwByte;
  40.  
  41. /*********************************************************************
  42.  *
  43.  * Functions.
  44.  *
  45.  *********************************************************************/
  46.  
  47. /*********************************************************************/
  48.  
  49. /* Simple HSV to RGB conversion */
  50. extern void RtHSVToRGB(RwReal h, RwReal s, RwReal v, RwByte *r, RwByte *g, RwByte *b);
  51.  
  52. /* Build a ramp starting at entry with the given hue and saturarion */
  53. extern void RtGenRamp(RwPaletteEntry* entry, RwReal hue, RwReal sat);
  54.  
  55. /* Set the given ramp to a ramp based on the given hue and saturation */
  56. extern void RtSetRamp(RwPaletteEntry* palette, int ramp, RwReal hue, RwReal sat);
  57.  
  58. /* Fill the array of palette entries with (something similar) to the default palette */
  59. extern void RtDefaultPalette(RwPaletteEntry* palette);
  60.  
  61. /*********************************************************************/
  62.  
  63. #endif
  64.