Panda3D
pointParticleFactory.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 pointParticleFactory.cxx
10  * @author charles
11  * @date 2000-07-05
12  */
13 
14 #include "pointParticleFactory.h"
15 #include "pointParticle.h"
16 
17 #include <stdlib.h>
18 
19 /**
20  * default constructor
21  */
25 }
26 
27 /**
28  * copy constructor
29  */
32  BaseParticleFactory(copy) {
33 }
34 
35 /**
36  * destructor
37  */
40 }
41 
42 /**
43  * child particle generation function
44  */
45 void PointParticleFactory::
46 populate_child_particle(BaseParticle *bp) const {
47  bp->set_oriented(false);
48 }
49 
50 /**
51  * child particle generation function
52  */
53 BaseParticle *PointParticleFactory::
54 alloc_particle() const {
55  return new PointParticle;
56 }
57 
58 /**
59  * Write a string representation of this instance to <out>.
60  */
62 output(std::ostream &out) const {
63  #ifndef NDEBUG //[
64  out<<"PointParticleFactory";
65  #endif //] NDEBUG
66 }
67 
68 /**
69  * Write a string representation of this instance to <out>.
70  */
72 write(std::ostream &out, int indent) const {
73  #ifndef NDEBUG //[
74  out.width(indent); out<<""; out<<"PointParticleFactory:\n";
76  #endif //] NDEBUG
77 }
Describes a particle that requires representation by a point (pixel, sparkle, billboard)
Definition: pointParticle.h:23
Pure Virtual base class for creating particles.
Creates point particles to user specs.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition: indent.cxx:20
PointParticleFactory()
default constructor
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
An individual, physically-modelable particle abstract base class.
Definition: baseParticle.h:23
virtual ~PointParticleFactory()
destructor
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void set_oriented(bool flag)
Set flag to determine whether this object should do any rotation or orientation calculations.