home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / 3DTOSHI2.ZIP / mpg3d / include / G3dlight.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-01  |  1.2 KB  |  47 lines

  1.  
  2. // g3dlight.h
  3. //
  4. // Copyright (c) 1996 by Toshiaki Tsuji, all rights reserved.
  5.  
  6. #ifndef __G3DLIGHT_H__
  7. #define __G3DLIGHT_H__
  8.  
  9. #include "stdgfx.h"
  10. #include "g3dobj.h"
  11.  
  12. #define OBJECT_TYPE_LIGHT  2
  13.  
  14. #define LIGHT_TYPE_SPOT    1
  15. #define LIGHT_TYPE_DIR     2
  16.  
  17. class G3DLIGHT : public G3DOBJECT
  18.   {
  19.     protected :
  20.       float MinIntensity,MaxIntensity;
  21.       float ScaleFactor;
  22.       COLORTABLE *ShadeTable;
  23.       LONG LightType;
  24.       
  25.     public :
  26.       G3DLIGHT ();
  27.       virtual ~G3DLIGHT ();
  28.  
  29.       VOID SetShadeTable ( COLORTABLE *NewShadeTable );
  30.       COLORTABLE* GetShadeTable () { return ShadeTable; };
  31.  
  32.       VOID SetLightType ( LONG Type ) { LightType = Type; };
  33.       LONG GetLightType () { return LightType; };
  34.  
  35.       VOID SetMinIntensity ( float Intensity ) { MinIntensity = Intensity*65536; };
  36.       VOID SetMaxIntensity ( float Intensity ) { MaxIntensity = Intensity*65536; };
  37.       VOID SetScaleFactor ( float Factor ) { ScaleFactor = Factor*65536; };
  38.       
  39.       float ComputeIntensity ( FLPVECTOR3D *Point, FLPVECTOR3D *Normal );
  40.       virtual VOID SetPosition ( float x, float y, float z );
  41.   }; // End of G3DLIGHT 
  42.  
  43. #endif
  44.  
  45.  
  46.  
  47.