home *** CD-ROM | disk | FTP | other *** search
/ VRML Tools for 3D Cyberspace / VRML_Tools_For_3D_Cyberspace.iso / amber / include / texture.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-01  |  1.5 KB  |  74 lines

  1. //**********************************************************************
  2. //  DIVE Laboratories, Inc.
  3. //  Copyright(c) 1995
  4. //  All rights reserved
  5. //  FILE:   TEXTURE.HPP
  6. //
  7. //  DESCRIPTION
  8. //  This file provides the function prototypes for the textureClass
  9. //
  10. //  Author: M. Doucet
  11. //
  12. //  Modification History:
  13. //  6/1/95    Created
  14. //
  15. //**********************************************************************
  16. #ifndef _TEXTURE_HPP
  17. #define _TEXTURE_HPP
  18.  
  19. #include <stdio.h>
  20. #include "vrtypes.hpp"
  21.  
  22. class texel32Class;
  23. class texel64Class;
  24. class texel128Class;
  25. class texel256Class;
  26. class texel512Class;
  27. class geometryClass;
  28.  
  29. class textureClass {
  30.  
  31.     friend class geometryClass;
  32.  
  33. private:
  34.  
  35.     void *texelStart;
  36.     int width, height;
  37.     int active32, active64, active128, active256, active512;
  38.     char fileName[255];
  39.     int displayListIndex;
  40.     int useDisplayList;
  41.     int components;
  42.     int bits;
  43.     flagType vrmlSaved;
  44.  
  45. public:
  46.  
  47.     float xUVMult, yUVMult;
  48.  
  49.     int  translucent;
  50.  
  51.     void *texels;
  52.     void select();
  53.     void setTransparentColor(UC4 rgba);
  54.     void getPixel(int row, int col, UC4 rgba);  
  55.     void setPixel(int row, int col, UC4 rgba); 
  56.     void getSize(I2 size);
  57.     void setUseDisplayList(int flag); 
  58.  
  59.     char *getFilename();
  60.  
  61.     void save(char *filename, 
  62.                  int numComponents,
  63.                  int colorBits,
  64.                  fileEnumType fileType=_TGA_FILE);
  65.     void saveVrmlTo(FILE *fp, int numComponents, int tabStops=0);
  66.  
  67.     textureClass(char *filename, fileEnumType=_TGA_FILE);
  68.     textureClass(int xSize, int ySize);
  69.     ~textureClass();
  70.  
  71. };
  72.  
  73. #endif
  74.