Panda3D
 All Classes Functions Variables Enumerations
angularForce.cxx
1 // Filename: angularForce.cxx
2 // Created by: charles (08Aug00)
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 #include "angularForce.h"
16 
17 TypeHandle AngularForce::_type_handle;
18 
19 ////////////////////////////////////////////////////////////////////
20 // Function : AngularForce
21 // Access : protected
22 // Description : constructor
23 ////////////////////////////////////////////////////////////////////
24 AngularForce::
25 AngularForce() :
26  BaseForce() {
27 }
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function : AngularForce
31 // Access : protected
32 // Description : copy constructor
33 ////////////////////////////////////////////////////////////////////
34 AngularForce::
35 AngularForce(const AngularForce &copy) :
36  BaseForce(copy) {
37 }
38 
39 ////////////////////////////////////////////////////////////////////
40 // Function : ~AngularForce
41 // Access : public, virtual
42 // Description : destructor
43 ////////////////////////////////////////////////////////////////////
46 }
47 
48 ////////////////////////////////////////////////////////////////////
49 // Function : get_quat
50 // Access : public
51 // Description : access query
52 ////////////////////////////////////////////////////////////////////
54 get_quat(const PhysicsObject *po) {
55  LRotation v = get_child_quat(po);
56  return v;
57 }
58 
59 ////////////////////////////////////////////////////////////////////
60 // Function : is_linear
61 // Access : public
62 // Description : access query
63 ////////////////////////////////////////////////////////////////////
64 bool AngularForce::
65 is_linear() const {
66  return false;
67 }
68 
69 ////////////////////////////////////////////////////////////////////
70 // Function : output
71 // Access : Public
72 // Description : Write a string representation of this instance to
73 // <out>.
74 ////////////////////////////////////////////////////////////////////
75 void AngularForce::
76 output(ostream &out) const {
77  #ifndef NDEBUG //[
78  out<<"AngularForce (id "<<this<<")";
79  #endif //] NDEBUG
80 }
81 
82 ////////////////////////////////////////////////////////////////////
83 // Function : write
84 // Access : Public
85 // Description : Write a string representation of this instance to
86 // <out>.
87 ////////////////////////////////////////////////////////////////////
88 void AngularForce::
89 write(ostream &out, unsigned int indent) const {
90  #ifndef NDEBUG //[
91  out.width(indent); out<<""; out<<"AngularForce (id "<<this<<")\n";
92  BaseForce::write(out, indent+2);
93  #endif //] NDEBUG
94 }
virtual void write(ostream &out, unsigned int indent=0) const
Write a string representation of this instance to &lt;out&gt;.
This is a unit quaternion representing a rotation.
Definition: lrotation.h:92
A body on which physics will be applied.
Definition: physicsObject.h:29
virtual bool is_linear() const
access query
pure virtual base class for all forces that could POSSIBLY exist.
Definition: baseForce.h:32
virtual void write(ostream &out, int indent_level=0) const
Write a string representation of this instance to &lt;out&gt;.
Definition: baseForce.cxx:72
virtual ~AngularForce()
destructor
virtual void output(ostream &out) const
Write a string representation of this instance to &lt;out&gt;.
LRotation get_quat(const PhysicsObject *po)
access query
pure virtual parent of all quat-based forces.
Definition: angularForce.h:24
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85