diff options
author | idb | 2008-12-05 16:48:47 +0000 |
---|---|---|
committer | idb | 2008-12-05 16:48:47 +0000 |
commit | 7ae9ec217d6e1ec039fbd6ed16c952d56cc63dc6 (patch) | |
tree | 6fed56271b075ef0c9c42e3cc899e86e54ea4c25 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | Fixed Mantis #2756 (diff) | |
download | opensim-SC-7ae9ec217d6e1ec039fbd6ed16c952d56cc63dc6.zip opensim-SC-7ae9ec217d6e1ec039fbd6ed16c952d56cc63dc6.tar.gz opensim-SC-7ae9ec217d6e1ec039fbd6ed16c952d56cc63dc6.tar.bz2 opensim-SC-7ae9ec217d6e1ec039fbd6ed16c952d56cc63dc6.tar.xz |
Implementation of the llDetectedTouch* functions
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 54 |
1 files changed, 42 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7a7c8d6..f98a9bb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -889,46 +889,76 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
889 | return new LSL_Integer(parms.LinkNum); | 889 | return new LSL_Integer(parms.LinkNum); |
890 | } | 890 | } |
891 | 891 | ||
892 | /// <summary> | ||
893 | /// See http://wiki.secondlife.com/wiki/LlDetectedTouchBinormal for details | ||
894 | /// </summary> | ||
892 | public LSL_Vector llDetectedTouchBinormal(int index) | 895 | public LSL_Vector llDetectedTouchBinormal(int index) |
893 | { | 896 | { |
894 | m_host.AddScriptLPS(1); | 897 | m_host.AddScriptLPS(1); |
895 | NotImplemented("llDetectedTouchBinormal"); | 898 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, index); |
896 | return new LSL_Vector(); | 899 | if (detectedParams == null || detectedParams.TouchBinormal == null) |
900 | return new LSL_Vector(); | ||
901 | return detectedParams.TouchBinormal; | ||
897 | } | 902 | } |
898 | 903 | ||
904 | /// <summary> | ||
905 | /// See http://wiki.secondlife.com/wiki/LlDetectedTouchFace for details | ||
906 | /// </summary> | ||
899 | public LSL_Integer llDetectedTouchFace(int index) | 907 | public LSL_Integer llDetectedTouchFace(int index) |
900 | { | 908 | { |
901 | m_host.AddScriptLPS(1); | 909 | m_host.AddScriptLPS(1); |
902 | NotImplemented("llDetectedTouchFace"); | 910 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, index); |
903 | return new LSL_Integer(0); | 911 | if (detectedParams == null || detectedParams.TouchFace == null) |
912 | return new LSL_Integer(-1); | ||
913 | return new LSL_Integer(detectedParams.TouchFace); | ||
904 | } | 914 | } |
905 | 915 | ||
916 | /// <summary> | ||
917 | /// See http://wiki.secondlife.com/wiki/LlDetectedTouchNormal for details | ||
918 | /// </summary> | ||
906 | public LSL_Vector llDetectedTouchNormal(int index) | 919 | public LSL_Vector llDetectedTouchNormal(int index) |
907 | { | 920 | { |
908 | m_host.AddScriptLPS(1); | 921 | m_host.AddScriptLPS(1); |
909 | NotImplemented("llDetectedTouchNormal"); | 922 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, index); |
910 | return new LSL_Vector(); | 923 | if (detectedParams == null || detectedParams.TouchNormal == null) |
924 | return new LSL_Vector(); | ||
925 | return detectedParams.TouchNormal; | ||
911 | } | 926 | } |
912 | 927 | ||
928 | /// <summary> | ||
929 | /// See http://wiki.secondlife.com/wiki/LlDetectedTouchPos for details | ||
930 | /// </summary> | ||
913 | public LSL_Vector llDetectedTouchPos(int index) | 931 | public LSL_Vector llDetectedTouchPos(int index) |
914 | { | 932 | { |
915 | m_host.AddScriptLPS(1); | 933 | m_host.AddScriptLPS(1); |
916 | NotImplemented("llDetectedTouchPos"); | 934 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, index); |
917 | return new LSL_Vector(); | 935 | if (detectedParams == null || detectedParams.TouchPos == null) |
936 | return new LSL_Vector(); | ||
937 | return detectedParams.TouchPos; | ||
918 | } | 938 | } |
919 | 939 | ||
940 | /// <summary> | ||
941 | /// See http://wiki.secondlife.com/wiki/LlDetectedTouchST for details | ||
942 | /// </summary> | ||
920 | public LSL_Vector llDetectedTouchST(int index) | 943 | public LSL_Vector llDetectedTouchST(int index) |
921 | { | 944 | { |
922 | m_host.AddScriptLPS(1); | 945 | m_host.AddScriptLPS(1); |
923 | NotImplemented("llDetectedTouchST"); | 946 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, index); |
924 | return new LSL_Vector(); | 947 | if (detectedParams == null || detectedParams.TouchST == null) |
948 | return new LSL_Vector(-1.0, -1.0, 0.0); | ||
949 | return detectedParams.TouchST; | ||
925 | } | 950 | } |
926 | 951 | ||
952 | /// <summary> | ||
953 | /// See http://wiki.secondlife.com/wiki/LlDetectedTouchUV for details | ||
954 | /// </summary> | ||
927 | public LSL_Vector llDetectedTouchUV(int index) | 955 | public LSL_Vector llDetectedTouchUV(int index) |
928 | { | 956 | { |
929 | m_host.AddScriptLPS(1); | 957 | m_host.AddScriptLPS(1); |
930 | NotImplemented("llDetectedTouchUV"); | 958 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_itemID, index); |
931 | return new LSL_Vector(); | 959 | if (detectedParams == null || detectedParams.TouchUV == null) |
960 | return new LSL_Vector(-1.0, -1.0, 0.0); | ||
961 | return detectedParams.TouchUV; | ||
932 | } | 962 | } |
933 | 963 | ||
934 | public void llDie() | 964 | public void llDie() |