zone.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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/zone.h $*
  25. * *
  26. * Author:: Greg_h *
  27. * *
  28. * $Modtime:: 9/09/99 2:19p $*
  29. * *
  30. * $Revision:: 6 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if 0 // TODO: implement zones one day???
  36. #ifndef ZONE_H
  37. #define ZONE_H
  38. #ifndef ALWAYS_H
  39. #include "always.h"
  40. #endif
  41. #ifndef REFCOUNT_H
  42. #include "refcount.h"
  43. #endif
  44. #ifndef OBBOX_H
  45. #include "obbox.h"
  46. #endif
  47. /*
  48. - Physobjs cache a list of the zones they are in
  49. - PhysScene maintains an aabtree of zones
  50. - Zones are PhysObjs only so I can re-use the AABTree
  51. - Zones contain a bit field of "type" attributes.
  52. - When a new ZoneList is built, it contains the union of all of the attributes
  53. - Some zones never need to be actually added to the list, only their bits OR'd in (lava)
  54. - Zones never MOVE or they only move out
  55. - Zones DO/CAN move
  56. - don't cache zone lists for now
  57. - motion parenting?
  58. - maybe do cache zone lists but invalidate the ones that could be affected by a moving zone
  59. - Dynamic objects can store a dynamic vector of "attached zone nodes". Each node
  60. has a pointer to a zone and the relative transform. Whenever the object moves, pull
  61. the zone out, transform it, put it back in.
  62. */
  63. /*
  64. ** ZoneClass!
  65. **
  66. ** Zones are basically rectangular regions of space. This is the abstract base class
  67. ** for all zones. Zones will perform functions such as:
  68. ** "Trigger Zone" - inform the game whenever a physical object enters it.
  69. ** "Water Zone" - apply a boyancy force to physical objects penetrating the zone.
  70. */
  71. class ZoneClass : public RefCountClass
  72. {
  73. public:
  74. ZoneClass(void) {}
  75. virtual ~ZoneClass(void) {}
  76. private:
  77. // bounding box which defines the space enclosed by this zone
  78. OBBoxClass Box;
  79. };
  80. #endif
  81. #endif //0