Obj Light Point.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /******************************************************************************/
  2. namespace Game{
  3. /******************************************************************************/
  4. STRUCT(ObjLightPoint , Obj) // Game Point Light Object
  5. //{
  6. Bool cast_shadows;
  7. Flt range, volumetric;
  8. Vec position, color;
  9. // manage
  10. virtual void create(Object &obj); // create from object
  11. // get / set
  12. virtual Vec pos ( ); // get position
  13. virtual void pos (C Vec &pos ); // set position
  14. virtual Matrix matrix( ); // get matrix
  15. virtual void matrix(C Matrix &matrix); // set matrix, only 'matrix.pos' is used in this method
  16. // update
  17. virtual Bool update(); // update, return false when object wants to be deleted, and true if wants to exist
  18. // draw
  19. virtual void drawPrepare(C Matrix &matrix); // draw at 'matrix' matrix
  20. virtual UInt drawPrepare( ); // prepare for drawing, this will be called in RM_PREPARE mode, in this method you should add the meshes to the draw list (Mesh::draw), and return a combination of bits of which additional render modes will be required for custom drawing of the object (for example "return IndexToFlag(RM_BLEND)" requests blend mode rendering)
  21. // io
  22. virtual Bool save(File &f); // save, false on fail
  23. virtual Bool load(File &f); // load, false on fail
  24. ~ObjLightPoint();
  25. ObjLightPoint();
  26. };
  27. /******************************************************************************/
  28. } // namespace
  29. /******************************************************************************/