gxlight.h 597 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef GXLIGHT_H
  2. #define GXLIGHT_H
  3. class gxScene;
  4. class gxLight{
  5. public:
  6. gxLight( gxScene *scene,int type );
  7. ~gxLight();
  8. D3DLIGHT7 d3d_light;
  9. private:
  10. gxScene *scene;
  11. /***** GX INTERFACE *****/
  12. public:
  13. enum{
  14. LIGHT_DISTANT=1,LIGHT_POINT=2,LIGHT_SPOT=3
  15. };
  16. void setRange( float range );
  17. void setColor( const float rgb[3] ){ memcpy( &d3d_light.dcvDiffuse,rgb,12 ); }
  18. void setPosition( const float pos[3] );
  19. void setDirection( const float dir[3] );
  20. void setConeAngles( float inner,float outer );
  21. void getColor( float rgb[3] ){ memcpy( rgb,&d3d_light.dcvDiffuse,12 ); }
  22. };
  23. #endif