pscene_decal.cpp 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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/pscene_decal.cpp $*
  25. * *
  26. * Original Author:: Greg Hjelstrom *
  27. * *
  28. * $Author:: Greg_h $*
  29. * *
  30. * $Modtime:: 6/29/01 11:37a $*
  31. * *
  32. * $Revision:: 9 $*
  33. * *
  34. *---------------------------------------------------------------------------------------------*
  35. * Functions: *
  36. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  37. #include "pscene.h"
  38. #include "colmathaabox.h"
  39. #include "assetmgr.h"
  40. #include "vertmaterial.h"
  41. #include "camera.h"
  42. #include "physdecalsys.h"
  43. #include "phys.h"
  44. /*
  45. ** PhysicsSceneClass Decal Methods
  46. */
  47. void PhysicsSceneClass::Allocate_Decal_Resources(void)
  48. {
  49. WWASSERT(DecalSystem == NULL);
  50. DecalSystem = new PhysDecalSysClass(this);
  51. }
  52. void PhysicsSceneClass::Release_Decal_Resources(void)
  53. {
  54. if (DecalSystem != NULL) {
  55. delete DecalSystem;
  56. }
  57. }
  58. int PhysicsSceneClass::Create_Decal
  59. (
  60. const Matrix3D & tm,
  61. const char * texture_name,
  62. float radius,
  63. bool is_permanent,
  64. bool apply_to_translucent_meshes,
  65. PhysClass * only_this_obj
  66. )
  67. {
  68. WWASSERT(DecalSystem != NULL);
  69. return DecalSystem->Create_Decal(tm,texture_name,radius,is_permanent,apply_to_translucent_meshes,only_this_obj);
  70. }
  71. bool PhysicsSceneClass::Remove_Decal(uint32 id)
  72. {
  73. WWASSERT(DecalSystem != NULL);
  74. return DecalSystem->Remove_Decal(id);
  75. }