Panda3D
orientedParticleFactory.h
1 // Filename: orientedParticleFactory.h
2 // Created by: charles (05Jul00)
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 #ifndef ORIENTEDPARTICLEFACTORY_H
16 #define ORIENTEDPARTICLEFACTORY_H
17 
18 #include "baseParticleFactory.h"
19 
20 #include "luse.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : OrientedParticleFactory
24 // Description : Creates particles that are affected by angular
25 // forces.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDAPHYSICS OrientedParticleFactory : public BaseParticleFactory {
28 PUBLISHED:
31  virtual ~OrientedParticleFactory();
32 
33  INLINE void set_initial_orientation(const LOrientation &o);
34  INLINE void set_final_orientation(const LOrientation &o);
35  INLINE LOrientation get_initial_orientation() const;
36  INLINE LOrientation get_final_orientation() const;
37 
38  virtual void output(ostream &out) const;
39  virtual void write(ostream &out, unsigned int indent=0) const;
40 
41 private:
42  virtual void populate_child_particle(BaseParticle *bp) const;
43  virtual BaseParticle *alloc_particle() const;
44 
45  LOrientation _initial_orientation;
46  LOrientation _final_orientation;
47 };
48 
49 #include "orientedParticleFactory.I"
50 
51 #endif // ORIENTEDPARTICLEFACTORY_H
virtual void write(ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Pure Virtual base class for creating particles.
This is a unit quaternion representing an orientation.
Definition: lorientation.h:92
Creates particles that are affected by angular forces.
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.
An individual, physically-modelable particle abstract base class.
Definition: baseParticle.h:26