00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "spherecollider.h"
00023
00024 using namespace oxygen;
00025 using namespace boost;
00026 using namespace salt;
00027
00028 FUNCTION(SphereCollider,setRadius)
00029 {
00030 float inRadius;
00031
00032 if (
00033 (in.GetSize() != 1) ||
00034 (! in.GetValue(in.begin(),inRadius))
00035 )
00036 {
00037 return false;
00038 }
00039
00040 obj->SetRadius(inRadius);
00041 return true;
00042 }
00043
00044 FUNCTION(SphereCollider,getRadius)
00045 {
00046 return obj->GetRadius();
00047 }
00048
00049 FUNCTION(SphereCollider,getPointDepth)
00050 {
00051 Vector3f inPos;
00052
00053 if (
00054 (in.GetSize() == 0) ||
00055 (! in.GetValue(in.begin(), inPos))
00056 )
00057 {
00058 return 0;
00059 }
00060
00061 return obj->GetPointDepth(inPos);
00062 }
00063
00064 void CLASS(SphereCollider)::DefineClass()
00065 {
00066 DEFINE_BASECLASS(oxygen/Collider);
00067 DEFINE_FUNCTION(setRadius);
00068 DEFINE_FUNCTION(getRadius);
00069 DEFINE_FUNCTION(getPointDepth);
00070 }