Panda3D

linearJitterForce.cxx

00001 // Filename: linearJitterForce.cxx
00002 // Created by:  charles (16Jun00)
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 "linearJitterForce.h"
00016 
00017 TypeHandle LinearJitterForce::_type_handle;
00018 
00019 ////////////////////////////////////////////////////////////////////
00020 //    Function : LinearJitterForce
00021 //      Access : Public
00022 // Description : constructor
00023 ////////////////////////////////////////////////////////////////////
00024 LinearJitterForce::
00025 LinearJitterForce(PN_stdfloat a, bool mass) :
00026   LinearRandomForce(a, mass) {
00027 }
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //    Function : LinearJitterForce
00031 //      Access : Public
00032 // Description : copy constructor
00033 ////////////////////////////////////////////////////////////////////
00034 LinearJitterForce::
00035 LinearJitterForce(const LinearJitterForce &copy) :
00036   LinearRandomForce(copy) {
00037 }
00038 
00039 ////////////////////////////////////////////////////////////////////
00040 //    Function : LinearJitterForce
00041 //      Access : Public
00042 // Description : constructor
00043 ////////////////////////////////////////////////////////////////////
00044 LinearJitterForce::
00045 ~LinearJitterForce() {
00046 }
00047 
00048 ////////////////////////////////////////////////////////////////////
00049 //    Function : make_copy
00050 //      Access : Public
00051 // Description : copier
00052 ////////////////////////////////////////////////////////////////////
00053 LinearForce *LinearJitterForce::
00054 make_copy() {
00055   return new LinearJitterForce(*this);
00056 }
00057 
00058 ////////////////////////////////////////////////////////////////////
00059 //    Function : get_child_vector
00060 //      Access : Public
00061 // Description : random value
00062 ////////////////////////////////////////////////////////////////////
00063 LVector3 LinearJitterForce::
00064 get_child_vector(const PhysicsObject *) {
00065   return random_unit_vector();
00066 }
00067 
00068 ////////////////////////////////////////////////////////////////////
00069 //     Function : output
00070 //       Access : Public
00071 //  Description : Write a string representation of this instance to
00072 //                <out>.
00073 ////////////////////////////////////////////////////////////////////
00074 void LinearJitterForce::
00075 output(ostream &out) const {
00076   #ifndef NDEBUG //[
00077   out<<"LinearJitterForce";
00078   #endif //] NDEBUG
00079 }
00080 
00081 ////////////////////////////////////////////////////////////////////
00082 //     Function : write
00083 //       Access : Public
00084 //  Description : Write a string representation of this instance to
00085 //                <out>.
00086 ////////////////////////////////////////////////////////////////////
00087 void LinearJitterForce::
00088 write(ostream &out, unsigned int indent) const {
00089   #ifndef NDEBUG //[
00090   out.width(indent); out<<""; out<<"LinearJitterForce:\n";
00091   LinearRandomForce::write(out, indent+2);
00092   #endif //] NDEBUG
00093 }
 All Classes Functions Variables Enumerations