00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "physxPointInPlaneJoint.h"
00016 #include "physxPointInPlaneJointDesc.h"
00017
00018 TypeHandle PhysxPointInPlaneJoint::_type_handle;
00019
00020
00021
00022
00023
00024
00025 void PhysxPointInPlaneJoint::
00026 link(NxJoint *jointPtr) {
00027
00028 _ptr = jointPtr->isPointInPlaneJoint();
00029 _ptr->userData = this;
00030 _error_type = ET_ok;
00031
00032 set_name(jointPtr->getName());
00033
00034 PhysxScene *scene = (PhysxScene *)_ptr->getScene().userData;
00035 scene->_joints.add(this);
00036 }
00037
00038
00039
00040
00041
00042
00043 void PhysxPointInPlaneJoint::
00044 unlink() {
00045
00046 _ptr->userData = NULL;
00047 _error_type = ET_released;
00048
00049 PhysxScene *scene = (PhysxScene *)_ptr->getScene().userData;
00050 scene->_joints.remove(this);
00051 }
00052
00053
00054
00055
00056
00057
00058
00059 void PhysxPointInPlaneJoint::
00060 save_to_desc(PhysxPointInPlaneJointDesc &jointDesc) const {
00061
00062 nassertv(_error_type == ET_ok);
00063 _ptr->saveToDesc(jointDesc._desc);
00064 }
00065
00066
00067
00068
00069
00070
00071
00072 void PhysxPointInPlaneJoint::
00073 load_from_desc(const PhysxPointInPlaneJointDesc &jointDesc) {
00074
00075 nassertv(_error_type == ET_ok);
00076 _ptr->loadFromDesc(jointDesc._desc);
00077 }
00078