Panda3D
Loading...
Searching...
No Matches
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
16TypeHandle LinearJitterForce::_type_handle;
17
18/**
19 * constructor
20 */
22LinearJitterForce(PN_stdfloat a, bool mass) :
23 LinearRandomForce(a, mass) {
24}
25
26/**
27 * copy constructor
28 */
33
34/**
35 * constructor
36 */
40
41/**
42 * copier
43 */
44LinearForce *LinearJitterForce::
45make_copy() {
46 return new LinearJitterForce(*this);
47}
48
49/**
50 * random value
51 */
52LVector3 LinearJitterForce::
53get_child_vector(const PhysicsObject *) {
54 return random_unit_vector();
55}
56
57/**
58 * Write a string representation of this instance to <out>.
59 */
61output(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 */
71write(std::ostream &out, int indent) const {
72 #ifndef NDEBUG //[
73 out.width(indent); out<<""; out<<"LinearJitterForce:\n";
75 #endif //] NDEBUG
76}
A force that acts on a PhysicsObject by way of an Integrator.
Definition linearForce.h:23
Completely random noise force vector.
LinearJitterForce(PN_stdfloat a=1.0f, bool m=false)
constructor
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual ~LinearJitterForce()
constructor
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
Pure virtual, parent to noiseForce and jitterForce.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
A body on which physics will be applied.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
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.