Panda3D
linearIntegrator.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file linearIntegrator.h
10  * @author charles
11  * @date 2000-06-13
12  */
13 
14 #ifndef LINEARINTEGRATOR_H
15 #define LINEARINTEGRATOR_H
16 
17 #include "physicsObject.h"
18 #include "baseIntegrator.h"
19 #include "linearForce.h"
20 #include "configVariableDouble.h"
21 
22 /**
23  * Pure virtual base class for physical modeling. Takes physically modelable
24  * objects and applies forces to them.
25  */
26 class EXPCL_PANDA_PHYSICS LinearIntegrator : public BaseIntegrator {
27 PUBLISHED:
28  virtual ~LinearIntegrator();
29 public:
30 
31  void integrate(Physical *physical, LinearForceVector &forces,
32  PN_stdfloat dt);
33 
34 PUBLISHED:
35  virtual void output(std::ostream &out) const;
36  virtual void write(std::ostream &out, int indent=0) const;
37 
38 protected:
40 
41 private:
42  static ConfigVariableDouble _max_linear_dt;
43 
44  // this allows baseLinearIntegrator to censormodify data that the actual
45  // integration function receives.
46  virtual void child_integrate(Physical *physical,
47  LinearForceVector &forces,
48  PN_stdfloat dt) = 0;
49 };
50 
51 #endif // LINEARINTEGRATOR_H
Pure virtual base class for physical modeling.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition: indent.cxx:20
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Defines a set of physically modeled attributes.
Definition: physical.h:37
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.