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
16 TypeHandle LinearJitterForce::_type_handle;
17
18/**
19 * constructor
20 */
21 LinearJitterForce::
22 LinearJitterForce(PN_stdfloat a, bool mass) :
23 LinearRandomForce(a, mass) {
24}
25
26/**
27 * copy constructor
28 */
29 LinearJitterForce::
30 LinearJitterForce(const LinearJitterForce &copy) :
31 LinearRandomForce(copy) {
32}
33
34/**
35 * constructor
36 */
37 LinearJitterForce::
38~LinearJitterForce() {
39}
40
41/**
42 * copier
43 */
44 LinearForce *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 */
60 void LinearJitterForce::
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 */
70 void LinearJitterForce::
71 write(std::ostream &out, int indent) const {
72 #ifndef NDEBUG //[
73 out.width(indent); out<<""; out<<"LinearJitterForce:\n";
74 LinearRandomForce::write(out, indent+2);
75 #endif //] NDEBUG
76}
LinearForce
A force that acts on a PhysicsObject by way of an Integrator.
Definition linearForce.h:23
LinearJitterForce::LinearJitterForce
LinearJitterForce(PN_stdfloat a=1.0f, bool m=false)
constructor
Definition linearJitterForce.cxx:22
LinearJitterForce::write
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Definition linearJitterForce.cxx:71
LinearJitterForce::~LinearJitterForce
virtual ~LinearJitterForce()
constructor
Definition linearJitterForce.cxx:38
LinearJitterForce::output
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
Definition linearJitterForce.cxx:61
LinearRandomForce::write
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
Definition linearRandomForce.cxx:63
PhysicsObject
A body on which physics will be applied.
Definition physicsObject.h:27
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
indent
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition indent.cxx:20
linearJitterForce.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.