Panda3D
 All Classes Functions Variables Enumerations
pointParticle.cxx
1 // Filename: pointParticle.cxx
2 // Created by: charles (19Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "pointParticle.h"
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function : PointParticle
19 // Access : Public
20 // Description : simple constructor
21 ////////////////////////////////////////////////////////////////////
23 PointParticle(PN_stdfloat lifespan, bool alive) :
24  BaseParticle(lifespan, alive) {
25  set_oriented(false);
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function : PointParticle
30 // Access : Public
31 // Description : copy constructor
32 ////////////////////////////////////////////////////////////////////
35  BaseParticle(copy) {
36  set_oriented(false);
37 }
38 
39 ////////////////////////////////////////////////////////////////////
40 // Function : ~PointParticle
41 // Access : Public
42 // Description : simple destructor
43 ////////////////////////////////////////////////////////////////////
46 }
47 
48 ////////////////////////////////////////////////////////////////////
49 // Function : make_copy
50 // Access : Public
51 // Description : dynamic copier
52 ////////////////////////////////////////////////////////////////////
54 make_copy() const {
55  return new PointParticle(*this);
56 }
57 
58 ////////////////////////////////////////////////////////////////////
59 // Function : die
60 // Access : Public
61 // Description : particle death routine
62 ////////////////////////////////////////////////////////////////////
63 void PointParticle::
64 die() {
65 }
66 
67 ////////////////////////////////////////////////////////////////////
68 // Function : init
69 // Access : Public
70 // Description : particle init routine
71 ////////////////////////////////////////////////////////////////////
72 void PointParticle::
73 init() {
74 }
75 
76 ////////////////////////////////////////////////////////////////////
77 // Function : update
78 // Access : Public
79 // Description : particle update
80 ////////////////////////////////////////////////////////////////////
81 void PointParticle::
82 update() {
83 }
84 
85 ////////////////////////////////////////////////////////////////////
86 // Function : output
87 // Access : Public
88 // Description : Write a string representation of this instance to
89 // <out>.
90 ////////////////////////////////////////////////////////////////////
91 void PointParticle::
92 output(ostream &out) const {
93  #ifndef NDEBUG //[
94  out<<"PointParticle";
95  #endif //] NDEBUG
96 }
97 
98 ////////////////////////////////////////////////////////////////////
99 // Function : write
100 // Access : Public
101 // Description : Write a string representation of this instance to
102 // <out>.
103 ////////////////////////////////////////////////////////////////////
104 void PointParticle::
105 write(ostream &out, int indent) const {
106  #ifndef NDEBUG //[
107  out.width(indent); out<<""; out<<"PointParticle:\n";
108  BaseParticle::write(out, indent+2);
109  #endif //] NDEBUG
110 }
Describes a particle that requires representation by a point (pixel, sparkle, billboard) ...
Definition: pointParticle.h:25
virtual void update()
particle update
A body on which physics will be applied.
Definition: physicsObject.h:29
virtual ~PointParticle()
simple destructor
virtual void output(ostream &out) const
Write a string representation of this instance to &lt;out&gt;.
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to &lt;out&gt;.
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to &lt;out&gt;.
An individual, physically-modelable particle abstract base class.
Definition: baseParticle.h:26
virtual void init()
particle init routine
PointParticle(PN_stdfloat lifespan=0.0f, bool alive=false)
simple constructor
virtual PhysicsObject * make_copy() const
dynamic copier
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