Panda3D
panda
src
particlesystem
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
*/
19
PointEmitter::
20
PointEmitter
() :
21
BaseParticleEmitter
() {
22
_location.set(0.0f, 0.0f, 0.0f);
23
}
24
25
/**
26
* copy constructor
27
*/
28
PointEmitter::
29
PointEmitter
(
const
PointEmitter
©) :
30
BaseParticleEmitter
(copy) {
31
_location = copy._location;
32
}
33
34
/**
35
* destructor
36
*/
37
PointEmitter::
38
~PointEmitter
() {
39
}
40
41
/**
42
* copier
43
*/
44
BaseParticleEmitter
*
PointEmitter::
45
make_copy
() {
46
return
new
PointEmitter
(*
this
);
47
}
48
49
/**
50
* Generates a location for a new particle
51
*/
52
void
PointEmitter::
53
assign_initial_position(LPoint3& pos) {
54
pos = _location;
55
}
56
57
/**
58
* Generates a velocity for a new particle
59
*/
60
void
PointEmitter::
61
assign_initial_velocity(LVector3& vel) {
62
vel.set(0,0,0);
63
}
64
65
/**
66
* Write a string representation of this instance to <out>.
67
*/
68
void
PointEmitter::
69
output
(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
*/
78
void
PointEmitter::
79
write
(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"
;
83
BaseParticleEmitter::write
(out,
indent
+2);
84
#endif //] NDEBUG
85
}
PointEmitter::write
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Definition:
pointEmitter.cxx:79
PointEmitter::PointEmitter
PointEmitter()
constructor
Definition:
pointEmitter.cxx:20
BaseParticleEmitter::write
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Definition:
baseParticleEmitter.cxx:92
PointEmitter::~PointEmitter
virtual ~PointEmitter()
destructor
Definition:
pointEmitter.cxx:38
PointEmitter
Describes a planar ring region in which particles are generated.
Definition:
pointEmitter.h:22
indent
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition:
indent.cxx:20
PointEmitter::output
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
Definition:
pointEmitter.cxx:69
PointEmitter::make_copy
virtual BaseParticleEmitter * make_copy()
copier
Definition:
pointEmitter.cxx:45
BaseParticleEmitter
Definition:
baseParticleEmitter.h:25
pointEmitter.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Wed Jan 23 2019 21:40:08 for Panda3D by
1.8.15