Panda3D
linearJitterForce.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 linearJitterForce.cxx
10  * @author charles
11  * @date 2000-06-16
12  */
13 
14 #include "linearJitterForce.h"
15 
16 TypeHandle LinearJitterForce::_type_handle;
17 
18 /**
19  * constructor
20  */
22 LinearJitterForce(PN_stdfloat a, bool mass) :
23  LinearRandomForce(a, mass) {
24 }
25 
26 /**
27  * copy constructor
28  */
31  LinearRandomForce(copy) {
32 }
33 
34 /**
35  * constructor
36  */
39 }
40 
41 /**
42  * copier
43  */
44 LinearForce *LinearJitterForce::
45 make_copy() {
46  return new LinearJitterForce(*this);
47 }
48 
49 /**
50  * random value
51  */
52 LVector3 LinearJitterForce::
53 get_child_vector(const PhysicsObject *) {
54  return random_unit_vector();
55 }
56 
57 /**
58  * Write a string representation of this instance to <out>.
59  */
61 output(std::ostream &out) const {
62  #ifndef NDEBUG //[
63  out<<"LinearJitterForce";
64  #endif //] NDEBUG
65 }
66 
67 /**
68  * Write a string representation of this instance to <out>.
69  */
71 write(std::ostream &out, int indent) const {
72  #ifndef NDEBUG //[
73  out.width(indent); out<<""; out<<"LinearJitterForce:\n";
75  #endif //] NDEBUG
76 }
virtual ~LinearJitterForce()
constructor
Pure virtual, parent to noiseForce and jitterForce.
A body on which physics will be applied.
Definition: physicsObject.h:27
LinearJitterForce(PN_stdfloat a=1.0f, bool m=false)
constructor
A force that acts on a PhysicsObject by way of an Integrator.
Definition: linearForce.h:23
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition: indent.cxx:20
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Completely random noise force vector.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
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>.