nodefilt.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /*
  2. ** Command & Conquer Generals Zero Hour(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. /* $Header: /Commando/Code/Tools/max2w3d/nodefilt.h 6 1/14/98 10:23a Greg_h $ */
  19. /***********************************************************************************************
  20. *** Confidential - Westwood Studios ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Commando / G *
  24. * *
  25. * File Name : NODEFILT.H *
  26. * *
  27. * Programmer : Greg Hjelstrom *
  28. * *
  29. * Start Date : 06/09/97 *
  30. * *
  31. * Last Update : June 9, 1997 [GH] *
  32. * *
  33. *---------------------------------------------------------------------------------------------*
  34. * Functions: *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  36. #ifndef NODEFILT_H
  37. #define NODEFILT_H
  38. #include "always.h"
  39. #include <Max.h>
  40. /***************************************************************
  41. *
  42. * INodeFilterClass
  43. *
  44. * This is simply an object used to accept or reject INodes
  45. * based on whatever criteria you desire. There are some
  46. * default node filters defined in this module or you can
  47. * create your own by inheriting the Abstract Base Class
  48. * INodeFilterClass and implementing the Accept_Node method.
  49. *
  50. ***************************************************************/
  51. class INodeFilterClass
  52. {
  53. public:
  54. virtual BOOL Accept_Node(INode * node, TimeValue time) = 0;
  55. };
  56. /***************************************************************
  57. *
  58. * AnyINodeFilter
  59. *
  60. * Accepts all INodes...
  61. *
  62. ***************************************************************/
  63. class AnyINodeFilter : public INodeFilterClass
  64. {
  65. public:
  66. virtual BOOL Accept_Node(INode * node, TimeValue time) { return TRUE; }
  67. };
  68. /***************************************************************
  69. *
  70. * HelperINodeFilter
  71. *
  72. * Accepts INodes which are Helper objects
  73. *
  74. ***************************************************************/
  75. class HelperINodeFilter : public INodeFilterClass
  76. {
  77. public:
  78. virtual BOOL Accept_Node(INode * node, TimeValue time);
  79. };
  80. /***************************************************************
  81. *
  82. * MeshINodeFilter
  83. *
  84. * Only accepts INodes which are Triangle meshes
  85. *
  86. ***************************************************************/
  87. class MeshINodeFilter : public INodeFilterClass
  88. {
  89. public:
  90. virtual BOOL Accept_Node(INode * node, TimeValue time);
  91. };
  92. /***************************************************************
  93. *
  94. * VisibleMeshINodeFilter
  95. *
  96. * Only accepts INodes which are Triangle meshes and are
  97. * currently visible
  98. *
  99. ***************************************************************/
  100. class VisibleMeshINodeFilter : public INodeFilterClass
  101. {
  102. public:
  103. virtual BOOL Accept_Node(INode * node, TimeValue time);
  104. };
  105. /***************************************************************
  106. *
  107. * VisibleHelperINodeFilter
  108. *
  109. * Only accepts INodes which are Helper objects and are
  110. * currently visible
  111. *
  112. ***************************************************************/
  113. class VisibleHelperINodeFilter : public INodeFilterClass
  114. {
  115. public:
  116. virtual BOOL Accept_Node(INode * node, TimeValue time);
  117. };
  118. /***************************************************************
  119. *
  120. * VisibleMeshOrHelperINodeFilter
  121. *
  122. * Only accepts INodes which are Triangle meshes or helper
  123. * objects and are currently visible
  124. *
  125. ***************************************************************/
  126. class VisibleMeshOrHelperINodeFilter : public INodeFilterClass
  127. {
  128. public:
  129. virtual BOOL Accept_Node(INode * node, TimeValue time);
  130. };
  131. /***************************************************************
  132. *
  133. * AnimatedINodeFilter
  134. *
  135. * Only accepts INodes which contain at least on animation
  136. * key.
  137. *
  138. ***************************************************************/
  139. class AnimatedINodeFilter : public INodeFilterClass
  140. {
  141. public:
  142. virtual BOOL Accept_Node(INode * node, TimeValue time);
  143. };
  144. /***************************************************************
  145. *
  146. * VisibleSelectedINodeFilter
  147. *
  148. * Only accepts INodes which are Visible and Selected
  149. *
  150. ***************************************************************/
  151. class VisibleSelectedINodeFilter : public INodeFilterClass
  152. {
  153. public:
  154. virtual BOOL Accept_Node(INode * node, TimeValue time);
  155. };
  156. #endif /*NODEFILT_H*/