Panda3D
|
00001 // Filename: linearControlForce.I 00002 // Created by: Dave Schuyler (2006) 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 //////////////////////////////////////////////////////////////////// 00016 // Function : clear_physics_object 00017 // Access : Public 00018 // Description : encapsulating wrapper 00019 //////////////////////////////////////////////////////////////////// 00020 INLINE void LinearControlForce:: 00021 clear_physics_object() { 00022 _physics_object = (const PhysicsObject*)NULL; 00023 } 00024 00025 //////////////////////////////////////////////////////////////////// 00026 // Function : set_physics_object 00027 // Access : Public 00028 // Description : encapsulating wrapper 00029 //////////////////////////////////////////////////////////////////// 00030 INLINE void LinearControlForce:: 00031 set_physics_object(const PhysicsObject *po) { 00032 _physics_object = po; 00033 } 00034 00035 //////////////////////////////////////////////////////////////////// 00036 // Function : get_physics_object 00037 // Access : Public 00038 // Description : piecewise encapsulating wrapper 00039 //////////////////////////////////////////////////////////////////// 00040 INLINE CPT(PhysicsObject) LinearControlForce:: 00041 get_physics_object() const { 00042 return _physics_object; 00043 } 00044 00045 //////////////////////////////////////////////////////////////////// 00046 // Function : set_vector 00047 // Access : Public 00048 // Description : encapsulating wrapper 00049 //////////////////////////////////////////////////////////////////// 00050 INLINE void LinearControlForce:: 00051 set_vector(const LVector3& v) { 00052 _fvec = v; 00053 } 00054 00055 //////////////////////////////////////////////////////////////////// 00056 // Function : set_vector 00057 // Access : Public 00058 // Description : piecewise encapsulating wrapper 00059 //////////////////////////////////////////////////////////////////// 00060 INLINE void LinearControlForce:: 00061 set_vector(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) { 00062 _fvec.set(x, y, z); 00063 } 00064 00065 //////////////////////////////////////////////////////////////////// 00066 // Function : get_local_vector 00067 // Access : Public 00068 // Description : 00069 //////////////////////////////////////////////////////////////////// 00070 INLINE LVector3 LinearControlForce:: 00071 get_local_vector() const { 00072 return _fvec; 00073 }