Panda3D
Loading...
Searching...
No Matches
angularIntegrator.cxx
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 angularIntegrator.cxx
10 * @author charles
11 * @date 2000-08-09
12 */
13
14#include "angularIntegrator.h"
15
16ConfigVariableDouble AngularIntegrator::_max_angular_dt
17("default_max_angular_dt", 1.0f / 30.0f);
18
19/**
20 * constructor
21 */
22AngularIntegrator::
23AngularIntegrator() {
24}
25
26/**
27 * destructor
28 */
32
33/**
34 * high-level integration. API.
35 */
37integrate(Physical *physical, AngularForceVector& forces,
38 PN_stdfloat dt) {
39 // intercept in case we want to censoradjust values
40 if (dt > _max_angular_dt) {
41 dt = _max_angular_dt;
42 }
43
44 // this actually does the integration.
45 child_integrate(physical, forces, dt);
46}
47
48/**
49 * Write a string representation of this instance to <out>.
50 */
52output(std::ostream &out) const {
53 #ifndef NDEBUG //[
54 out<<"AngularIntegrator";
55 #endif //] NDEBUG
56}
57
58/**
59 * Write a string representation of this instance to <out>.
60 */
62write(std::ostream &out, int indent) const {
63 #ifndef NDEBUG //[
64 out.width(indent); out<<""; out<<"AngularIntegrator:\n";
65 out.width(indent+2); out<<""; out<<"_max_angular_dt "<<_max_angular_dt<<" (class const)\n";
67 #endif //] NDEBUG
68}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
void integrate(Physical *physical, AngularForceVector &forces, PN_stdfloat dt)
high-level integration.
virtual ~AngularIntegrator()
destructor
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
This is a convenience class to specialize ConfigVariable as a floating- point type.
Defines a set of physically modeled attributes.
Definition physical.h:37
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition indent.cxx:20