Panda3D
Loading...
Searching...
No Matches
pointEmitter.cxx
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 pointEmitter.cxx
10 * @author charles
11 * @date 2000-06-22
12 */
13
14#include "pointEmitter.h"
15
16/**
17 * constructor
18 */
22 _location.set(0.0f, 0.0f, 0.0f);
23}
24
25/**
26 * copy constructor
27 */
29PointEmitter(const PointEmitter &copy) :
31 _location = copy._location;
32}
33
34/**
35 * destructor
36 */
40
41/**
42 * copier
43 */
48
49/**
50 * Generates a location for a new particle
51 */
52void PointEmitter::
53assign_initial_position(LPoint3& pos) {
54 pos = _location;
55}
56
57/**
58 * Generates a velocity for a new particle
59 */
60void PointEmitter::
61assign_initial_velocity(LVector3& vel) {
62 vel.set(0,0,0);
63}
64
65/**
66 * Write a string representation of this instance to <out>.
67 */
69output(std::ostream &out) const {
70 #ifndef NDEBUG //[
71 out<<"PointEmitter";
72 #endif //] NDEBUG
73}
74
75/**
76 * Write a string representation of this instance to <out>.
77 */
79write(std::ostream &out, int indent) const {
80 #ifndef NDEBUG //[
81 out.width(indent); out<<""; out<<"PointEmitter:\n";
82 out.width(indent+2); out<<""; out<<"_location "<<_location<<"\n";
84 #endif //] NDEBUG
85}
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Describes a planar ring region in which particles are generated.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
virtual BaseParticleEmitter * make_copy()
copier
PointEmitter()
constructor
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual ~PointEmitter()
destructor
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition indent.cxx:20
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.