Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/particlesystem/orientedParticleFactory.cxx

Go to the documentation of this file.
00001 // Filename: orientedParticleFactory.cxx
00002 // Created by:  charles (05Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include "orientedParticleFactory.h"
00020 #include "orientedParticle.h"
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //    Function : OrientedParticleFactory
00024 //      Access : Public
00025 // Description : Constructor
00026 ////////////////////////////////////////////////////////////////////
00027 OrientedParticleFactory::
00028 OrientedParticleFactory(void) :
00029   BaseParticleFactory() {
00030 }
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //    Function : OrientedParticleFactory
00034 //      Access : Public
00035 // Description : copy Constructor
00036 ////////////////////////////////////////////////////////////////////
00037 OrientedParticleFactory::
00038 OrientedParticleFactory(const OrientedParticleFactory &copy) :
00039   BaseParticleFactory(copy) {
00040   _initial_orientation = copy._initial_orientation;
00041   _final_orientation = copy._final_orientation;
00042 }
00043 
00044 ////////////////////////////////////////////////////////////////////
00045 //    Function : ~OrientedParticleFactory
00046 //      Access : public
00047 // Description : destructor
00048 ////////////////////////////////////////////////////////////////////
00049 OrientedParticleFactory::
00050 ~OrientedParticleFactory(void) {
00051 }
00052 
00053 ////////////////////////////////////////////////////////////////////
00054 //    Function : populate_child_particle
00055 //      Access : private
00056 // Description : child spawn
00057 ////////////////////////////////////////////////////////////////////
00058 void OrientedParticleFactory::
00059 populate_child_particle(BaseParticle *bp) const {
00060   bp->set_orientation(_initial_orientation);
00061 }
00062 
00063 ////////////////////////////////////////////////////////////////////
00064 //    Function : alloc_particle
00065 //      Access : public
00066 // Description : child particle generation function
00067 ////////////////////////////////////////////////////////////////////
00068 BaseParticle *OrientedParticleFactory::
00069 alloc_particle(void) const {
00070   return new OrientedParticle;
00071 }

Generated on Fri May 2 00:40:57 2003 for Panda by doxygen1.3