00001 // Filename: orientedParticleFactory.h 00002 // Created by: charles (05Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef ORIENTEDPARTICLEFACTORY_H 00016 #define ORIENTEDPARTICLEFACTORY_H 00017 00018 #include "baseParticleFactory.h" 00019 00020 #include "luse.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : OrientedParticleFactory 00024 // Description : Creates particles that are affected by angular 00025 // forces. 00026 //////////////////////////////////////////////////////////////////// 00027 class EXPCL_PANDAPHYSICS OrientedParticleFactory : public BaseParticleFactory { 00028 PUBLISHED: 00029 OrientedParticleFactory(); 00030 OrientedParticleFactory(const OrientedParticleFactory ©); 00031 virtual ~OrientedParticleFactory(); 00032 00033 INLINE void set_initial_orientation(const LOrientation &o); 00034 INLINE void set_final_orientation(const LOrientation &o); 00035 INLINE LOrientation get_initial_orientation() const; 00036 INLINE LOrientation get_final_orientation() const; 00037 00038 virtual void output(ostream &out) const; 00039 virtual void write(ostream &out, unsigned int indent=0) const; 00040 00041 private: 00042 virtual void populate_child_particle(BaseParticle *bp) const; 00043 virtual BaseParticle *alloc_particle() const; 00044 00045 LOrientation _initial_orientation; 00046 LOrientation _final_orientation; 00047 }; 00048 00049 #include "orientedParticleFactory.I" 00050 00051 #endif // ORIENTEDPARTICLEFACTORY_H