Panda3D
angularForce.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 angularForce.cxx
10  * @author charles
11  * @date 2000-08-08
12  */
13 
14 #include "angularForce.h"
15 
16 TypeHandle AngularForce::_type_handle;
17 
18 /**
19  * constructor
20  */
21 AngularForce::
22 AngularForce() :
23  BaseForce() {
24 }
25 
26 /**
27  * copy constructor
28  */
29 AngularForce::
30 AngularForce(const AngularForce &copy) :
31  BaseForce(copy) {
32 }
33 
34 /**
35  * destructor
36  */
39 }
40 
41 /**
42  * access query
43  */
44 LRotation AngularForce::
45 get_quat(const PhysicsObject *po) {
46  LRotation v = get_child_quat(po);
47  return v;
48 }
49 
50 /**
51  * access query
52  */
53 bool AngularForce::
54 is_linear() const {
55  return false;
56 }
57 
58 /**
59  * Write a string representation of this instance to <out>.
60  */
61 void AngularForce::
62 output(std::ostream &out) const {
63  #ifndef NDEBUG //[
64  out<<"AngularForce (id "<<this<<")";
65  #endif //] NDEBUG
66 }
67 
68 /**
69  * Write a string representation of this instance to <out>.
70  */
71 void AngularForce::
72 write(std::ostream &out, int indent) const {
73  #ifndef NDEBUG //[
74  out.width(indent); out<<""; out<<"AngularForce (id "<<this<<")\n";
75  BaseForce::write(out, indent+2);
76  #endif //] NDEBUG
77 }
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A body on which physics will be applied.
Definition: physicsObject.h:27
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
pure virtual base class for all forces that could POSSIBLY exist.
Definition: baseForce.h:29
virtual void write(std::ostream &out, int indent_level=0) const
Write a string representation of this instance to <out>.
Definition: baseForce.cxx:59
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Definition: indent.cxx:20
virtual ~AngularForce()
destructor
LRotation get_quat(const PhysicsObject *po)
access query
pure virtual parent of all quat-based forces.
Definition: angularForce.h:22
virtual bool is_linear() const
access query
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81