00001 // Filename: physxJointDriveDesc.cxx 00002 // Created by: enn0x (01Oct09) 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 "physxJointDriveDesc.h" 00016 00017 //////////////////////////////////////////////////////////////////// 00018 // Function: PhysxJointDriveDesc::spring 00019 // Access: Published 00020 // Description: 00021 //////////////////////////////////////////////////////////////////// 00022 void PhysxJointDriveDesc:: 00023 set_spring(float spring) { 00024 00025 _desc.spring = spring; 00026 } 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Function: PhysxJointDriveDesc::set_damping 00030 // Access: Published 00031 // Description: 00032 //////////////////////////////////////////////////////////////////// 00033 void PhysxJointDriveDesc:: 00034 set_damping(float damping) { 00035 00036 _desc.damping = damping; 00037 } 00038 00039 //////////////////////////////////////////////////////////////////// 00040 // Function: PhysxJointDriveDesc::set_force_limit 00041 // Access: Published 00042 // Description: 00043 //////////////////////////////////////////////////////////////////// 00044 void PhysxJointDriveDesc:: 00045 set_force_limit(float forceLimit) { 00046 00047 _desc.forceLimit = forceLimit; 00048 } 00049 00050 //////////////////////////////////////////////////////////////////// 00051 // Function: PhysxJointDriveDesc::set_drive_type 00052 // Access: Published 00053 // Description: 00054 //////////////////////////////////////////////////////////////////// 00055 void PhysxJointDriveDesc:: 00056 set_drive_type(PhysxD6JointDriveType driveType) { 00057 00058 _desc.driveType = (NxD6JointDriveType)driveType; 00059 } 00060 00061 //////////////////////////////////////////////////////////////////// 00062 // Function: PhysxJointDriveDesc::get_spring 00063 // Access: Published 00064 // Description: 00065 //////////////////////////////////////////////////////////////////// 00066 float PhysxJointDriveDesc:: 00067 get_spring() const { 00068 00069 return _desc.spring; 00070 } 00071 00072 //////////////////////////////////////////////////////////////////// 00073 // Function: PhysxJointDriveDesc::get_damping 00074 // Access: Published 00075 // Description: 00076 //////////////////////////////////////////////////////////////////// 00077 float PhysxJointDriveDesc:: 00078 get_damping() const { 00079 00080 return _desc.damping; 00081 } 00082 00083 //////////////////////////////////////////////////////////////////// 00084 // Function: PhysxJointDriveDesc::get_force_limit 00085 // Access: Published 00086 // Description: 00087 //////////////////////////////////////////////////////////////////// 00088 float PhysxJointDriveDesc:: 00089 get_force_limit() const { 00090 00091 return _desc.forceLimit; 00092 } 00093 00094 //////////////////////////////////////////////////////////////////// 00095 // Function: PhysxJointDriveDesc::get_drive_type 00096 // Access: Published 00097 // Description: 00098 //////////////////////////////////////////////////////////////////// 00099 PhysxEnums::PhysxD6JointDriveType PhysxJointDriveDesc:: 00100 get_drive_type() const { 00101 00102 return (PhysxD6JointDriveType)_desc.driveType.bitField; 00103 } 00104