Panda3D
 All Classes Functions Variables Enumerations
angularIntegrator.cxx
00001 // Filename: angularIntegrator.cxx
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 #include "angularIntegrator.h"
00016 
00017 ConfigVariableDouble AngularIntegrator::_max_angular_dt
00018 ("default_max_angular_dt", 1.0f / 30.0f);
00019 
00020 ////////////////////////////////////////////////////////////////////
00021 //    Function : AngularIntegrator
00022 //      Access : protected
00023 // Description : constructor
00024 ////////////////////////////////////////////////////////////////////
00025 AngularIntegrator::
00026 AngularIntegrator() {
00027 }
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //    Function : ~AngularIntegrator
00031 //      Access : public, virtual
00032 // Description : destructor
00033 ////////////////////////////////////////////////////////////////////
00034 AngularIntegrator::
00035 ~AngularIntegrator() {
00036 }
00037 
00038 ////////////////////////////////////////////////////////////////////
00039 //    Function : Integrate
00040 //      Access : public
00041 // Description : high-level integration.  API.
00042 ////////////////////////////////////////////////////////////////////
00043 void AngularIntegrator::
00044 integrate(Physical *physical, AngularForceVector& forces,
00045           PN_stdfloat dt) {
00046   // intercept in case we want to censor/adjust values
00047   if (dt > _max_angular_dt) {
00048     dt = _max_angular_dt;
00049   }
00050 
00051   // this actually does the integration.
00052   child_integrate(physical, forces, dt);
00053 }
00054 
00055 ////////////////////////////////////////////////////////////////////
00056 //     Function : output
00057 //       Access : Public
00058 //  Description : Write a string representation of this instance to
00059 //                <out>.
00060 ////////////////////////////////////////////////////////////////////
00061 void AngularIntegrator::
00062 output(ostream &out) const {
00063   #ifndef NDEBUG //[
00064   out<<"AngularIntegrator";
00065   #endif //] NDEBUG
00066 }
00067 
00068 ////////////////////////////////////////////////////////////////////
00069 //     Function : write
00070 //       Access : Public
00071 //  Description : Write a string representation of this instance to
00072 //                <out>.
00073 ////////////////////////////////////////////////////////////////////
00074 void AngularIntegrator::
00075 write(ostream &out, unsigned int indent) const {
00076   #ifndef NDEBUG //[
00077   out.width(indent); out<<""; out<<"AngularIntegrator:\n";
00078   out.width(indent+2); out<<""; out<<"_max_angular_dt "<<_max_angular_dt<<" (class const)\n";
00079   BaseIntegrator::write(out, indent+2);
00080   #endif //] NDEBUG
00081 }
 All Classes Functions Variables Enumerations