00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "hinge2joint.h"
00023
00024 using namespace boost;
00025 using namespace oxygen;
00026 using namespace salt;
00027
00028 FUNCTION(Hinge2Joint,setAnchor)
00029 {
00030 Vector3f inAnchor;
00031
00032 if (
00033 (in.GetSize() == 0) ||
00034 (! in.GetValue(in.begin(), inAnchor))
00035 )
00036 {
00037 return false;
00038 }
00039
00040 obj->SetAnchor(inAnchor);
00041 return true;
00042 }
00043
00044 FUNCTION(Hinge2Joint,getAngle)
00045 {
00046 int inAxisIndex;
00047
00048 if (
00049 (in.GetSize() != 0) ||
00050 (! in.GetValue(in.begin(), inAxisIndex))
00051 )
00052 {
00053 return false;
00054 }
00055
00056 obj->GetAngle(static_cast<Joint::EAxisIndex>(inAxisIndex));
00057 return true;
00058 }
00059
00060 FUNCTION(Hinge2Joint,getAngleRate)
00061 {
00062 int inAxisIndex;
00063
00064 if (
00065 (in.GetSize() != 0) ||
00066 (! in.GetValue(in.begin(), inAxisIndex))
00067 )
00068 {
00069 return false;
00070 }
00071
00072 obj->GetAngleRate(static_cast<Joint::EAxisIndex>(inAxisIndex));
00073 return true;
00074 }
00075
00076 void CLASS(Hinge2Joint)::DefineClass()
00077 {
00078 DEFINE_BASECLASS(oxygen/Joint);
00079 DEFINE_FUNCTION(setAnchor);
00080 DEFINE_FUNCTION(getAngle);
00081 DEFINE_FUNCTION(getAngleRate);
00082 }