Panda3D
 All Classes Functions Variables Enumerations
linearIntegrator.h
1 // Filename: linearIntegrator.h
2 // Created by: charles (13Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef LINEARINTEGRATOR_H
16 #define LINEARINTEGRATOR_H
17 
18 #include "physicsObject.h"
19 #include "baseIntegrator.h"
20 #include "linearForce.h"
21 #include "configVariableDouble.h"
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : LinearIntegrator
25 // Description : Pure virtual base class for physical modeling.
26 // Takes physically modelable objects and applies
27 // forces to them.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAPHYSICS LinearIntegrator : public BaseIntegrator {
30 PUBLISHED:
31  virtual ~LinearIntegrator();
32 public:
33 
34  void integrate(Physical *physical, LinearForceVector &forces,
35  PN_stdfloat dt);
36 
37 PUBLISHED:
38  virtual void output(ostream &out) const;
39  virtual void write(ostream &out, unsigned int indent=0) const;
40 
41 protected:
43 
44 private:
45  static ConfigVariableDouble _max_linear_dt;
46 
47  // this allows baseLinearIntegrator to censor/modify data that the
48  // actual integration function receives.
49  virtual void child_integrate(Physical *physical,
50  LinearForceVector &forces,
51  PN_stdfloat dt) = 0;
52 };
53 
54 #endif // LINEARINTEGRATOR_H
Pure virtual base class for physical modeling.
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.
pure virtual integrator class that holds cached matrix information that really should be common to an...
This is a convenience class to specialize ConfigVariable as a floating-point type.
Defines a set of physically modeled attributes.
Definition: physical.h:40
virtual void write(ostream &out, unsigned int indent=0) const
Write a string representation of this instance to <out>.