22 _endpoint1.set(1.0f, 0.0f, 0.0f);
23 _endpoint2.set(0.0f, 0.0f, 0.0f);
32 _endpoint1 = copy._endpoint1;
33 _endpoint2 = copy._endpoint2;
55 assign_initial_position(LPoint3& pos) {
56 PN_stdfloat t = NORMALIZED_RAND();
58 LVector3 v_diff = _endpoint2 - _endpoint1;
60 PN_stdfloat lerp_x = _endpoint1[0] + t * v_diff[0];
61 PN_stdfloat lerp_y = _endpoint1[1] + t * v_diff[1];
62 PN_stdfloat lerp_z = _endpoint1[2] + t * v_diff[2];
64 pos.set(lerp_x, lerp_y, lerp_z);
71 assign_initial_velocity(LVector3& vel) {
91 out.width(
indent); out<<
""; out<<
"LineEmitter:\n";
92 out.width(
indent+2); out<<
""; out<<
"_endpoint1 "<<_endpoint1<<
"\n";
93 out.width(
indent+2); out<<
""; out<<
"_endpoint2 "<<_endpoint2<<
"\n";
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Describes a linear region in which particles are generated.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
virtual BaseParticleEmitter * make_copy()
copier
virtual ~LineEmitter()
constructor
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.