Panda3D

angularIntegrator.h

00001 // Filename: angularIntegrator.h
00002 // Created by:  charles (09Aug00)
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 #ifndef ANGULARINTEGRATOR_H
00016 #define ANGULARINTEGRATOR_H
00017 
00018 #include "baseIntegrator.h"
00019 #include "angularForce.h"
00020 #include "configVariableDouble.h"
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //       Class : BaseAngularIntegrator
00024 // Description : Pure virtual base class for physical modeling.
00025 //               Takes physically modelable objects and applies
00026 //               forces to them.
00027 ////////////////////////////////////////////////////////////////////
00028 class EXPCL_PANDAPHYSICS AngularIntegrator : public BaseIntegrator {
00029 PUBLISHED:
00030   virtual ~AngularIntegrator();
00031 public:
00032 
00033   void integrate(Physical *physical, AngularForceVector &forces,
00034                  PN_stdfloat dt);
00035 
00036 PUBLISHED:  
00037   virtual void output(ostream &out) const;
00038   virtual void write(ostream &out, unsigned int indent=0) const;
00039 
00040 protected:
00041   AngularIntegrator();
00042 
00043 private:
00044   static ConfigVariableDouble _max_angular_dt;
00045 
00046   // this allows baseAngularIntegrator to censor/modify data that the
00047   // actual integration function receives.
00048   virtual void child_integrate(Physical *physical, AngularForceVector &forces,
00049                                PN_stdfloat dt) = 0;
00050 };
00051 
00052 #endif // ANGULARINTEGRATOR_H
 All Classes Functions Variables Enumerations