15 #include "boxEmitter.h" 25 _vmin.set(-0.5f, -0.5f, -0.5f);
26 _vmax.set( 0.5f, 0.5f, 0.5f);
66 assign_initial_position(
LPoint3& pos) {
67 PN_stdfloat t_x = NORMALIZED_RAND();
68 PN_stdfloat t_y = NORMALIZED_RAND();
69 PN_stdfloat t_z = NORMALIZED_RAND();
73 PN_stdfloat lerp_x = _vmin[0] + t_x * v_diff[0];
74 PN_stdfloat lerp_y = _vmin[1] + t_y * v_diff[1];
75 PN_stdfloat lerp_z = _vmin[2] + t_z * v_diff[2];
77 pos.set(lerp_x, lerp_y, lerp_z);
86 assign_initial_velocity(
LVector3& vel) {
110 write(ostream &out,
int indent)
const {
112 out.width(indent); out<<
""; out<<
"BoxEmitter:\n";
113 out.width(indent+2); out<<
""; out<<
"_vmin "<<_vmin<<
"\n";
114 out.width(indent+2); out<<
""; out<<
"_vmax "<<_vmax<<
"\n";
Describes a voluminous box region in which particles are generated.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
virtual BaseParticleEmitter * make_copy()
copier
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual ~BoxEmitter()
destructor
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.
Describes a physical region in space in which particles are randomly generated.