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

panda/src/physics/linearRandomForce.h

Go to the documentation of this file.
00001 // Filename: linearRandomForce.h
00002 // Created by:  charles (19Jun00)
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 #ifndef LINEARRANDOMFORCE_H
00020 #define LINEARRANDOMFORCE_H
00021 
00022 #include <stdlib.h>
00023 #include <math.h>
00024 
00025 #include "linearForce.h"
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : LinearRandomForce
00029 // Description : Pure virtual, parent to noiseForce and jitterForce
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDAPHYSICS LinearRandomForce : public LinearForce {
00032 protected:
00033   static float bounded_rand(void);
00034   static LVector3f random_unit_vector(void);
00035 
00036   LinearRandomForce(float a = 1.0f, bool m = false);
00037   LinearRandomForce(const LinearRandomForce &copy);
00038 
00039   virtual LVector3f get_child_vector(const PhysicsObject *po) = 0;
00040   virtual LinearForce *make_copy(void) = 0;
00041 
00042 PUBLISHED:
00043   virtual ~LinearRandomForce(void);
00044 
00045 public:
00046   static TypeHandle get_class_type(void) {
00047     return _type_handle;
00048   }
00049   static void init_type(void) {
00050     LinearForce::init_type();
00051     register_type(_type_handle, "LinearRandomForce",
00052                   LinearForce::get_class_type());
00053   }
00054   virtual TypeHandle get_type(void) const {
00055     return get_class_type();
00056   }
00057   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00058 
00059 private:
00060   static TypeHandle _type_handle;
00061 };
00062 
00063 #include "linearRandomForce.I"
00064 
00065 #endif // LINEARRANDOMFORCE_H

Generated on Fri May 2 00:42:58 2003 for Panda by doxygen1.3