Panda3D
pointParticle.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 pointParticle.cxx
10  * @author charles
11  * @date 2000-06-19
12  */
13 
14 #include "pointParticle.h"
15 
16 /**
17  * simple constructor
18  */
20 PointParticle(PN_stdfloat lifespan, bool alive) :
21  BaseParticle(lifespan, alive) {
22  set_oriented(false);
23 }
24 
25 /**
26  * copy constructor
27  */
30  BaseParticle(copy) {
31  set_oriented(false);
32 }
33 
34 /**
35  * simple destructor
36  */
39 }
40 
41 /**
42  * dynamic copier
43  */
45 make_copy() const {
46  return new PointParticle(*this);
47 }
48 
49 /**
50  * particle death routine
51  */
52 void PointParticle::
53 die() {
54 }
55 
56 /**
57  * particle init routine
58  */
59 void PointParticle::
60 init() {
61 }
62 
63 /**
64  * particle update
65  */
66 void PointParticle::
67 update() {
68 }
69 
70 /**
71  * Write a string representation of this instance to <out>.
72  */
73 void PointParticle::
74 output(std::ostream &out) const {
75  #ifndef NDEBUG //[
76  out<<"PointParticle";
77  #endif //] NDEBUG
78 }
79 
80 /**
81  * Write a string representation of this instance to <out>.
82  */
83 void PointParticle::
84 write(std::ostream &out, int indent) const {
85  #ifndef NDEBUG //[
86  out.width(indent); out<<""; out<<"PointParticle:\n";
88  #endif //] NDEBUG
89 }
Describes a particle that requires representation by a point (pixel, sparkle, billboard)
Definition: pointParticle.h:23
virtual void update()
particle update
A body on which physics will be applied.
Definition: physicsObject.h:27
virtual ~PointParticle()
simple destructor
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>.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition: indent.cxx:20
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual PhysicsObject * make_copy() const
dynamic copier
An individual, physically-modelable particle abstract base class.
Definition: baseParticle.h:23
virtual void init()
particle init routine
PointParticle(PN_stdfloat lifespan=0.0f, bool alive=false)
simple constructor
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.
virtual void die()
particle death routine