Panda3D
linearJitterForce.h
1 // Filename: linearJitterForce.h
2 // Created by: charles (13Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef LINEARJITTERFORCE_H
16 #define LINEARJITTERFORCE_H
17 
18 #include "linearRandomForce.h"
19 
20 ////////////////////////////////////////////////////////////////////
21 // Class : LinearJitterForce
22 // Description : Completely random noise force vector. Not
23 // repeatable, reliable, or predictable.
24 ////////////////////////////////////////////////////////////////////
25 class EXPCL_PANDAPHYSICS LinearJitterForce : public LinearRandomForce {
26 PUBLISHED:
27  LinearJitterForce(PN_stdfloat a = 1.0f, bool m = false);
29  virtual ~LinearJitterForce();
30 
31  virtual void output(ostream &out) const;
32  virtual void write(ostream &out, unsigned int indent=0) const;
33 
34 private:
35  virtual LVector3 get_child_vector(const PhysicsObject *po);
36  virtual LinearForce *make_copy();
37 
38 public:
39  static TypeHandle get_class_type() {
40  return _type_handle;
41  }
42  static void init_type() {
43  LinearRandomForce::init_type();
44  register_type(_type_handle, "LinearJitterForce",
45  LinearRandomForce::get_class_type());
46  }
47  virtual TypeHandle get_type() const {
48  return get_class_type();
49  }
50  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
51 
52 private:
53  static TypeHandle _type_handle;
54 };
55 
56 #endif // LINEARJITTERFORCE_H
virtual void write(ostream &out, unsigned int indent=0) const
Write a string representation of this instance to <out>.
Pure virtual, parent to noiseForce and jitterForce.
A body on which physics will be applied.
Definition: physicsObject.h:29
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
A force that acts on a PhysicsObject by way of an Integrator.
Definition: linearForce.h:25
Completely random noise force vector.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
virtual void output(ostream &out) const
Write a string representation of this instance to <out>.