home *** CD-ROM | disk | FTP | other *** search
/ 3D Games - Real-time Rend…ng & Software Technology / 3D Games - Real-time Rendering & Software Technology.iso / flysdk / frontend / flyLight / lightEngine.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-25  |  994 b   |  51 lines

  1. struct reta
  2. {
  3.     int sizex, sizey;
  4.     int offsetx, offsety, offsetz;
  5. };
  6.  
  7.  
  8. class retb
  9. {
  10. public:
  11.     retb();
  12.     virtual ~retb();
  13.     void add(struct reta *r);
  14.     int calc(int max_sx, int max_sy);
  15.  
  16. private:
  17.     bool arrumar(struct reta *r);
  18.     int procura(int sx, int sy);
  19.  
  20.     struct reta **l;
  21.     int nl;
  22. };
  23.  
  24. class lightEngine : public flyEngine
  25. {
  26. public:
  27.     unsigned *gltex;
  28.     int seltex,totlmindx;
  29.     unsigned char *pixel_flags;
  30.     int *lm_flags;
  31.  
  32.     void mark_used_bsp_faces(bsp_node *n);
  33.     void clear_lightmaps(unsigned char pixel_light);
  34.     static_mesh *get_object(bsp_node *n);
  35.     
  36.     void create_index_lightmaps();
  37.     
  38.     boundbox compute_bbox(int *facelist,int nf);
  39.     int compute_facelist(int facenum,int *facelist);
  40.     int compute_lightmap_uv(boundbox bb,int *facelist,int nf);
  41.     void compute_lightmaps();
  42.     
  43.     void apply_light(bsp_node *n,vector& pos,vector& color,float rad);
  44.     void light(char *f);
  45.  
  46.     void light_lightmaps();
  47.     void create_lightmaps();
  48.  
  49.     void sort_faces(bsp_node *n);
  50. };
  51.