Panda3D
|
00001 // Filename: geomParticleRenderer.I 00002 // Created by: charles (05Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 //////////////////////////////////////////////////////////////////// 00016 // Function : set_geom_node 00017 // Access : public 00018 //////////////////////////////////////////////////////////////////// 00019 00020 // we're forcing a pool resize to remove every node in the vector. 00021 // this is because nodes are reference-counted, and we have to 00022 // explicitly remove them from the node they were previously parented 00023 // to. 00024 00025 INLINE void GeomParticleRenderer:: 00026 set_geom_node(PandaNode *node) { 00027 nassertv(node != (PandaNode *)NULL); 00028 _geom_node = node; 00029 resize_pool(_pool_size); 00030 } 00031 00032 //////////////////////////////////////////////////////////////////// 00033 // Function : GeomParticleRenderer::set_x_scale_flag 00034 // Access : public 00035 //////////////////////////////////////////////////////////////////// 00036 INLINE void GeomParticleRenderer:: 00037 set_x_scale_flag(bool animate_x_ratio) { 00038 _animate_x_ratio = animate_x_ratio; 00039 init_geoms(); 00040 } 00041 00042 //////////////////////////////////////////////////////////////////// 00043 // Function : GeomParticleRenderer::set_y_scale_flag 00044 // Access : public 00045 //////////////////////////////////////////////////////////////////// 00046 INLINE void GeomParticleRenderer:: 00047 set_y_scale_flag(bool animate_y_ratio) { 00048 _animate_y_ratio = animate_y_ratio; 00049 init_geoms(); 00050 } 00051 00052 //////////////////////////////////////////////////////////////////// 00053 // Function : GeomParticleRenderer::set_z_scale_flag 00054 // Access : public 00055 //////////////////////////////////////////////////////////////////// 00056 INLINE void GeomParticleRenderer:: 00057 set_z_scale_flag(bool animate_z_ratio) { 00058 _animate_z_ratio = animate_z_ratio; 00059 init_geoms(); 00060 } 00061 00062 //////////////////////////////////////////////////////////////////// 00063 // Function : GeomParticleRenderer::set_initial_x_scale 00064 // Access : public 00065 //////////////////////////////////////////////////////////////////// 00066 INLINE void GeomParticleRenderer:: 00067 set_initial_x_scale(PN_stdfloat initial_x_scale) { 00068 _initial_x_scale = initial_x_scale; 00069 init_geoms(); 00070 } 00071 00072 //////////////////////////////////////////////////////////////////// 00073 // Function : GeomParticleRenderer::set_final_x_scale 00074 // Access : public 00075 //////////////////////////////////////////////////////////////////// 00076 INLINE void GeomParticleRenderer:: 00077 set_final_x_scale(PN_stdfloat final_x_scale) { 00078 _final_x_scale = final_x_scale; 00079 init_geoms(); 00080 } 00081 00082 //////////////////////////////////////////////////////////////////// 00083 // Function : GeomParticleRenderer::set_initial_y_scale 00084 // Access : public 00085 //////////////////////////////////////////////////////////////////// 00086 INLINE void GeomParticleRenderer:: 00087 set_initial_y_scale(PN_stdfloat initial_y_scale) { 00088 _initial_y_scale = initial_y_scale; 00089 init_geoms(); 00090 } 00091 00092 //////////////////////////////////////////////////////////////////// 00093 // Function : GeomParticleRenderer::set_final_y_scale 00094 // Access : public 00095 //////////////////////////////////////////////////////////////////// 00096 INLINE void GeomParticleRenderer:: 00097 set_final_y_scale(PN_stdfloat final_y_scale) { 00098 _final_y_scale = final_y_scale; 00099 init_geoms(); 00100 } 00101 00102 //////////////////////////////////////////////////////////////////// 00103 // Function : GeomParticleRenderer::set_initial_z_scale 00104 // Access : public 00105 //////////////////////////////////////////////////////////////////// 00106 INLINE void GeomParticleRenderer:: 00107 set_initial_z_scale(PN_stdfloat initial_z_scale) { 00108 _initial_z_scale = initial_z_scale; 00109 init_geoms(); 00110 } 00111 00112 //////////////////////////////////////////////////////////////////// 00113 // Function : GeomParticleRenderer::set_final_z_scale 00114 // Access : public 00115 //////////////////////////////////////////////////////////////////// 00116 INLINE void GeomParticleRenderer:: 00117 set_final_z_scale(PN_stdfloat final_z_scale) { 00118 _final_z_scale = final_z_scale; 00119 init_geoms(); 00120 } 00121 00122 //////////////////////////////////////////////////////////////////// 00123 // Function : get_geom_node 00124 // Access : public 00125 //////////////////////////////////////////////////////////////////// 00126 INLINE PandaNode *GeomParticleRenderer:: 00127 get_geom_node() { 00128 return _geom_node; 00129 } 00130 00131 //////////////////////////////////////////////////////////////////// 00132 // Function : get_color_interpolation_manager 00133 // Access : public 00134 //////////////////////////////////////////////////////////////////// 00135 INLINE ColorInterpolationManager* GeomParticleRenderer:: 00136 get_color_interpolation_manager() const { 00137 return _color_interpolation_manager; 00138 } 00139 00140 //////////////////////////////////////////////////////////////////// 00141 // Function : GeomParticleRenderer::get_x_scale_flag 00142 // Access : public 00143 //////////////////////////////////////////////////////////////////// 00144 INLINE bool GeomParticleRenderer:: 00145 get_x_scale_flag() const { 00146 return _animate_x_ratio; 00147 } 00148 00149 //////////////////////////////////////////////////////////////////// 00150 // Function : GeomParticleRenderer::get_y_scale_flag 00151 // Access : public 00152 //////////////////////////////////////////////////////////////////// 00153 INLINE bool GeomParticleRenderer:: 00154 get_y_scale_flag() const { 00155 return _animate_y_ratio; 00156 } 00157 00158 //////////////////////////////////////////////////////////////////// 00159 // Function : GeomParticleRenderer::get_z_scale_flag 00160 // Access : public 00161 //////////////////////////////////////////////////////////////////// 00162 INLINE bool GeomParticleRenderer:: 00163 get_z_scale_flag() const { 00164 return _animate_z_ratio; 00165 } 00166 00167 //////////////////////////////////////////////////////////////////// 00168 // Function : GeomParticleRenderer::get_initial_x_scale 00169 // Access : public 00170 //////////////////////////////////////////////////////////////////// 00171 INLINE PN_stdfloat GeomParticleRenderer:: 00172 get_initial_x_scale() const { 00173 return _initial_x_scale; 00174 } 00175 00176 //////////////////////////////////////////////////////////////////// 00177 // Function : GeomParticleRenderer::get_final_x_scale 00178 // Access : public 00179 //////////////////////////////////////////////////////////////////// 00180 INLINE PN_stdfloat GeomParticleRenderer:: 00181 get_final_x_scale() const { 00182 return _final_x_scale; 00183 } 00184 00185 //////////////////////////////////////////////////////////////////// 00186 // Function : GeomParticleRenderer::get_initial_y_scale 00187 // Access : public 00188 //////////////////////////////////////////////////////////////////// 00189 INLINE PN_stdfloat GeomParticleRenderer:: 00190 get_initial_y_scale() const { 00191 return _initial_y_scale; 00192 } 00193 00194 //////////////////////////////////////////////////////////////////// 00195 // Function : GeomParticleRenderer::get_final_y_scale 00196 // Access : public 00197 //////////////////////////////////////////////////////////////////// 00198 INLINE PN_stdfloat GeomParticleRenderer:: 00199 get_final_y_scale() const { 00200 return _final_y_scale; 00201 } 00202 00203 //////////////////////////////////////////////////////////////////// 00204 // Function : GeomParticleRenderer::get_initial_z_scale 00205 // Access : public 00206 //////////////////////////////////////////////////////////////////// 00207 INLINE PN_stdfloat GeomParticleRenderer:: 00208 get_initial_z_scale() const { 00209 return _initial_z_scale; 00210 } 00211 00212 //////////////////////////////////////////////////////////////////// 00213 // Function : GeomParticleRenderer::get_final_z_scale 00214 // Access : public 00215 //////////////////////////////////////////////////////////////////// 00216 INLINE PN_stdfloat GeomParticleRenderer:: 00217 get_final_z_scale() const { 00218 return _final_z_scale; 00219 }