Panda3D

orientedParticle.cxx

00001 // Filename: orientedParticle.cxx
00002 // Created by:  charles (19Jun00)
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 #include "orientedParticle.h"
00016 
00017 ////////////////////////////////////////////////////////////////////
00018 //    Function : OrientedParticle
00019 //      Access : public
00020 // Description : simple constructor
00021 ////////////////////////////////////////////////////////////////////
00022 OrientedParticle::
00023 OrientedParticle(int lifespan, bool alive) :
00024   BaseParticle(lifespan, alive) {
00025   set_oriented(true);
00026 }
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //    Function : OrientedParticle
00030 //      Access : public
00031 // Description : copy constructor
00032 ////////////////////////////////////////////////////////////////////
00033 OrientedParticle::
00034 OrientedParticle(const OrientedParticle &copy) :
00035   BaseParticle(copy) {
00036 }
00037 
00038 ////////////////////////////////////////////////////////////////////
00039 //    Function : ~OrientedParticle
00040 //      Access : public
00041 // Description : simple destructor
00042 ////////////////////////////////////////////////////////////////////
00043 OrientedParticle::
00044 ~OrientedParticle() {
00045 }
00046 
00047 ////////////////////////////////////////////////////////////////////
00048 //    Function : make_copy
00049 //      Access : public, virtual
00050 // Description : simple destructor
00051 ////////////////////////////////////////////////////////////////////
00052 PhysicsObject *OrientedParticle::
00053 make_copy() const {
00054   return new OrientedParticle(*this);
00055 }
00056 
00057 ////////////////////////////////////////////////////////////////////
00058 //    Function : init
00059 //      Access : Public
00060 // Description : particle init routine
00061 ////////////////////////////////////////////////////////////////////
00062 void OrientedParticle::
00063 init() {
00064 }
00065 
00066 ////////////////////////////////////////////////////////////////////
00067 //    Function : die
00068 //      Access : public
00069 // Description : particle death routine
00070 ////////////////////////////////////////////////////////////////////
00071 void OrientedParticle::
00072 die() {
00073 }
00074 
00075 ////////////////////////////////////////////////////////////////////
00076 //    Function : update
00077 //      Access : public
00078 // Description : particle update routine.
00079 //               This NEEDS to be filled in with quaternion slerp
00080 //               stuff, or oriented particles will not rotate.
00081 ////////////////////////////////////////////////////////////////////
00082 void OrientedParticle::
00083 update() {
00084 }
00085 
00086 ////////////////////////////////////////////////////////////////////
00087 //     Function : output
00088 //       Access : Public
00089 //  Description : Write a string representation of this instance to
00090 //                <out>.
00091 ////////////////////////////////////////////////////////////////////
00092 void OrientedParticle::
00093 output(ostream &out) const {
00094   #ifndef NDEBUG //[
00095   out<<"OrientedParticle";
00096   #endif //] NDEBUG
00097 }
00098 
00099 ////////////////////////////////////////////////////////////////////
00100 //     Function : write
00101 //       Access : Public
00102 //  Description : Write a string representation of this instance to
00103 //                <out>.
00104 ////////////////////////////////////////////////////////////////////
00105 void OrientedParticle::
00106 write(ostream &out, int indent) const {
00107   #ifndef NDEBUG //[
00108   out.width(indent); out<<""; out<<"OrientedParticle:\n";
00109   BaseParticle::write(out, indent+2);
00110   #endif //] NDEBUG
00111 }
 All Classes Functions Variables Enumerations