Panda3D
geomParticleRenderer.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file geomParticleRenderer.I
10  * @author charles
11  * @date 2000-07-05
12  */
13 
14 /**
15 
16  */
17 
18 // we're forcing a pool resize to remove every node in the vector. this is
19 // because nodes are reference-counted, and we have to explicitly remove them
20 // from the node they were previously parented to.
21 
22 INLINE void GeomParticleRenderer::
23 set_geom_node(PandaNode *node) {
24  nassertv(node != nullptr);
25  _geom_node = node;
26  resize_pool(_pool_size);
27 }
28 
29 /**
30 
31  */
32 INLINE void GeomParticleRenderer::
33 set_x_scale_flag(bool animate_x_ratio) {
34  _animate_x_ratio = animate_x_ratio;
35  init_geoms();
36 }
37 
38 /**
39 
40  */
41 INLINE void GeomParticleRenderer::
42 set_y_scale_flag(bool animate_y_ratio) {
43  _animate_y_ratio = animate_y_ratio;
44  init_geoms();
45 }
46 
47 /**
48 
49  */
50 INLINE void GeomParticleRenderer::
51 set_z_scale_flag(bool animate_z_ratio) {
52  _animate_z_ratio = animate_z_ratio;
53  init_geoms();
54 }
55 
56 /**
57 
58  */
59 INLINE void GeomParticleRenderer::
60 set_initial_x_scale(PN_stdfloat initial_x_scale) {
61  _initial_x_scale = initial_x_scale;
62  init_geoms();
63 }
64 
65 /**
66 
67  */
68 INLINE void GeomParticleRenderer::
69 set_final_x_scale(PN_stdfloat final_x_scale) {
70  _final_x_scale = final_x_scale;
71  init_geoms();
72 }
73 
74 /**
75 
76  */
77 INLINE void GeomParticleRenderer::
78 set_initial_y_scale(PN_stdfloat initial_y_scale) {
79  _initial_y_scale = initial_y_scale;
80  init_geoms();
81 }
82 
83 /**
84 
85  */
86 INLINE void GeomParticleRenderer::
87 set_final_y_scale(PN_stdfloat final_y_scale) {
88  _final_y_scale = final_y_scale;
89  init_geoms();
90 }
91 
92 /**
93 
94  */
95 INLINE void GeomParticleRenderer::
96 set_initial_z_scale(PN_stdfloat initial_z_scale) {
97  _initial_z_scale = initial_z_scale;
98  init_geoms();
99 }
100 
101 /**
102 
103  */
104 INLINE void GeomParticleRenderer::
105 set_final_z_scale(PN_stdfloat final_z_scale) {
106  _final_z_scale = final_z_scale;
107  init_geoms();
108 }
109 
110 /**
111 
112  */
113 INLINE PandaNode *GeomParticleRenderer::
114 get_geom_node() {
115  return _geom_node;
116 }
117 
118 /**
119 
120  */
121 INLINE ColorInterpolationManager* GeomParticleRenderer::
122 get_color_interpolation_manager() const {
123  return _color_interpolation_manager;
124 }
125 
126 /**
127 
128  */
129 INLINE bool GeomParticleRenderer::
130 get_x_scale_flag() const {
131  return _animate_x_ratio;
132 }
133 
134 /**
135 
136  */
137 INLINE bool GeomParticleRenderer::
138 get_y_scale_flag() const {
139  return _animate_y_ratio;
140 }
141 
142 /**
143 
144  */
145 INLINE bool GeomParticleRenderer::
146 get_z_scale_flag() const {
147  return _animate_z_ratio;
148 }
149 
150 /**
151 
152  */
153 INLINE PN_stdfloat GeomParticleRenderer::
154 get_initial_x_scale() const {
155  return _initial_x_scale;
156 }
157 
158 /**
159 
160  */
161 INLINE PN_stdfloat GeomParticleRenderer::
162 get_final_x_scale() const {
163  return _final_x_scale;
164 }
165 
166 /**
167 
168  */
169 INLINE PN_stdfloat GeomParticleRenderer::
170 get_initial_y_scale() const {
171  return _initial_y_scale;
172 }
173 
174 /**
175 
176  */
177 INLINE PN_stdfloat GeomParticleRenderer::
178 get_final_y_scale() const {
179  return _final_y_scale;
180 }
181 
182 /**
183 
184  */
185 INLINE PN_stdfloat GeomParticleRenderer::
186 get_initial_z_scale() const {
187  return _initial_z_scale;
188 }
189 
190 /**
191 
192  */
193 INLINE PN_stdfloat GeomParticleRenderer::
194 get_final_z_scale() const {
195  return _final_z_scale;
196 }
A basic node of the scene graph or data graph.
Definition: pandaNode.h:64
High level class for color interpolation.