diff options
author | Melanie | 2013-01-06 10:52:22 +0000 |
---|---|---|
committer | Melanie | 2013-01-06 10:52:22 +0000 |
commit | 083ac92b344262ae72516ba05cc93cdcd2f2a454 (patch) | |
tree | 1992de8e08171aac3e811fb1d43abc6ad8b894af /OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | bug fix, cleanup... (diff) | |
download | opensim-SC-083ac92b344262ae72516ba05cc93cdcd2f2a454.zip opensim-SC-083ac92b344262ae72516ba05cc93cdcd2f2a454.tar.gz opensim-SC-083ac92b344262ae72516ba05cc93cdcd2f2a454.tar.bz2 opensim-SC-083ac92b344262ae72516ba05cc93cdcd2f2a454.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs index 403a4ce..10d7d50 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs | |||
@@ -44,7 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
44 | using System; | 44 | using System; |
45 | using System.Runtime.InteropServices; | 45 | using System.Runtime.InteropServices; |
46 | using System.Security; | 46 | using System.Security; |
47 | 47 | using OMV = OpenMetaverse; | |
48 | namespace OdeAPI | 48 | namespace OdeAPI |
49 | { | 49 | { |
50 | //#if dDOUBLE | 50 | //#if dDOUBLE |
@@ -925,9 +925,20 @@ namespace OdeAPI | |||
925 | { | 925 | { |
926 | unsafe { return *(GeomGetPositionUnsafe(geom)); } | 926 | unsafe { return *(GeomGetPositionUnsafe(geom)); } |
927 | } | 927 | } |
928 | public static OMV.Vector3 GeomGetPositionOMV(IntPtr geom) | ||
929 | { | ||
930 | Vector3 vtmp = GeomGetPosition(geom); | ||
931 | return new OMV.Vector3(vtmp.X, vtmp.Y, vtmp.Z); | ||
932 | } | ||
928 | 933 | ||
929 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] | 934 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] |
930 | public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); | 935 | public static extern void GeomCopyQuaternion(IntPtr geom, out Quaternion q); |
936 | public static OMV.Quaternion GeomGetQuaternionOMV(IntPtr geom) | ||
937 | { | ||
938 | Quaternion qtmp; | ||
939 | GeomCopyQuaternion(geom, out qtmp); | ||
940 | return new OMV.Quaternion(qtmp.X, qtmp.Y, qtmp.Z, qtmp.W); | ||
941 | } | ||
931 | 942 | ||
932 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] | 943 | [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomGetQuaternion"), SuppressUnmanagedCodeSecurity] |
933 | public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); | 944 | public static extern void GeomCopyQuaternion(IntPtr geom, out dReal X); |