00001 // Filename: pointEmitter.cxx 00002 // Created by: charles (22Jun00) 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 "pointEmitter.h" 00020 00021 //////////////////////////////////////////////////////////////////// 00022 // Function : PointEmitter 00023 // Access : Public 00024 // Description : constructor 00025 //////////////////////////////////////////////////////////////////// 00026 PointEmitter:: 00027 PointEmitter(void) : 00028 BaseParticleEmitter() { 00029 _location.set(0.0f, 0.0f, 0.0f); 00030 } 00031 00032 //////////////////////////////////////////////////////////////////// 00033 // Function : PointEmitter 00034 // Access : Public 00035 // Description : copy constructor 00036 //////////////////////////////////////////////////////////////////// 00037 PointEmitter:: 00038 PointEmitter(const PointEmitter ©) : 00039 BaseParticleEmitter(copy) { 00040 _location = copy._location; 00041 } 00042 00043 //////////////////////////////////////////////////////////////////// 00044 // Function : ~PointEmitter 00045 // Access : Public 00046 // Description : destructor 00047 //////////////////////////////////////////////////////////////////// 00048 PointEmitter:: 00049 ~PointEmitter(void) { 00050 } 00051 00052 //////////////////////////////////////////////////////////////////// 00053 // Function : make_copy 00054 // Access : Public 00055 // Description : copier 00056 //////////////////////////////////////////////////////////////////// 00057 BaseParticleEmitter *PointEmitter:: 00058 make_copy(void) { 00059 return new PointEmitter(*this); 00060 } 00061 00062 //////////////////////////////////////////////////////////////////// 00063 // Function : PointEmitter::assign_initial_position 00064 // Access : Public 00065 // Description : Generates a location for a new particle 00066 //////////////////////////////////////////////////////////////////// 00067 void PointEmitter:: 00068 assign_initial_position(LPoint3f& pos) { 00069 pos = _location; 00070 } 00071 00072 //////////////////////////////////////////////////////////////////// 00073 // Function : PointEmitter::assign_initial_velocity 00074 // Access : Public 00075 // Description : Generates a velocity for a new particle 00076 //////////////////////////////////////////////////////////////////// 00077 void PointEmitter:: 00078 assign_initial_velocity(LVector3f& vel) { 00079 vel.set(0,0,0); 00080 }