Panda3D
|
00001 // Filename: angularForce.cxx 00002 // Created by: charles (08Aug00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "angularForce.h" 00016 00017 TypeHandle AngularForce::_type_handle; 00018 00019 //////////////////////////////////////////////////////////////////// 00020 // Function : AngularForce 00021 // Access : protected 00022 // Description : constructor 00023 //////////////////////////////////////////////////////////////////// 00024 AngularForce:: 00025 AngularForce() : 00026 BaseForce() { 00027 } 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Function : AngularForce 00031 // Access : protected 00032 // Description : copy constructor 00033 //////////////////////////////////////////////////////////////////// 00034 AngularForce:: 00035 AngularForce(const AngularForce ©) : 00036 BaseForce(copy) { 00037 } 00038 00039 //////////////////////////////////////////////////////////////////// 00040 // Function : ~AngularForce 00041 // Access : public, virtual 00042 // Description : destructor 00043 //////////////////////////////////////////////////////////////////// 00044 AngularForce:: 00045 ~AngularForce() { 00046 } 00047 00048 //////////////////////////////////////////////////////////////////// 00049 // Function : get_quat 00050 // Access : public 00051 // Description : access query 00052 //////////////////////////////////////////////////////////////////// 00053 LRotation AngularForce:: 00054 get_quat(const PhysicsObject *po) { 00055 LRotation v = get_child_quat(po); 00056 return v; 00057 } 00058 00059 //////////////////////////////////////////////////////////////////// 00060 // Function : is_linear 00061 // Access : public 00062 // Description : access query 00063 //////////////////////////////////////////////////////////////////// 00064 bool AngularForce:: 00065 is_linear() const { 00066 return false; 00067 } 00068 00069 //////////////////////////////////////////////////////////////////// 00070 // Function : output 00071 // Access : Public 00072 // Description : Write a string representation of this instance to 00073 // <out>. 00074 //////////////////////////////////////////////////////////////////// 00075 void AngularForce:: 00076 output(ostream &out) const { 00077 #ifndef NDEBUG //[ 00078 out<<"AngularForce (id "<<this<<")"; 00079 #endif //] NDEBUG 00080 } 00081 00082 //////////////////////////////////////////////////////////////////// 00083 // Function : write 00084 // Access : Public 00085 // Description : Write a string representation of this instance to 00086 // <out>. 00087 //////////////////////////////////////////////////////////////////// 00088 void AngularForce:: 00089 write(ostream &out, unsigned int indent) const { 00090 #ifndef NDEBUG //[ 00091 out.width(indent); out<<""; out<<"AngularForce (id "<<this<<")\n"; 00092 BaseForce::write(out, indent+2); 00093 #endif //] NDEBUG 00094 }