lightsolvecontext.h 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : WWPhys *
  23. * *
  24. * $Archive:: /Commando/Code/wwphys/lightsolvecontext.h $*
  25. * *
  26. * Original Author:: Greg Hjelstrom *
  27. * *
  28. * $Author:: Greg_h $*
  29. * *
  30. * $Modtime:: 2/27/02 1:21p $*
  31. * *
  32. * $Revision:: 2 $*
  33. * *
  34. *---------------------------------------------------------------------------------------------*
  35. * Functions: *
  36. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  37. #ifndef LIGHTSOLVECONTEXT_H
  38. #define LIGHTSOLVECONTEXT_H
  39. #include "always.h"
  40. #include "lightsolveprogress.h"
  41. class LightSolveObserverClass;
  42. /**
  43. ** LightSolveContextClass
  44. ** This class is a container for all of the options and current state of
  45. ** a light solve.
  46. ** Any temporary data which needs to be passed around during the solve can
  47. ** be added into this class.
  48. */
  49. class LightSolveContextClass
  50. {
  51. public:
  52. LightSolveContextClass(void);
  53. ~LightSolveContextClass(void);
  54. void Enable_Filtering(bool onoff) { FilteringEnabled = onoff; }
  55. bool Is_Filtering_Enabled(void) { return FilteringEnabled; }
  56. void Enable_Occlusion(bool onoff) { OcclusionEnabled = onoff; }
  57. bool Is_Occlusion_Enabled(void) { return OcclusionEnabled; }
  58. LightSolveProgressClass & Get_Progress(void) { return Progress; }
  59. void Set_Observer(LightSolveObserverClass * observer) { Observer = observer; }
  60. LightSolveObserverClass * Get_Observer(void) { return Observer; }
  61. void Update_Observer(void);
  62. protected:
  63. bool OcclusionEnabled;
  64. bool FilteringEnabled;
  65. LightSolveProgressClass Progress;
  66. LightSolveObserverClass * Observer;
  67. };
  68. /**
  69. ** LightSolveObserverClass
  70. ** Derive from this class and install your object in the light solve context to get
  71. ** progress callbacks periodically...
  72. */
  73. class LightSolveObserverClass
  74. {
  75. public:
  76. virtual ~LightSolveObserverClass(void) { };
  77. virtual void Progress_Callback(LightSolveContextClass & context) { };
  78. };
  79. #endif //LIGHTSOLVECONTEXT_H