aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs51
1 files changed, 23 insertions, 28 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index f285911..5a501ef 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -31,13 +31,12 @@ using System.Reflection;
31using System.Runtime.InteropServices; 31using System.Runtime.InteropServices;
32using System.Threading; 32using System.Threading;
33using System.IO; 33using System.IO;
34using Axiom.Math;
35using log4net; 34using log4net;
36using Nini.Config; 35using Nini.Config;
37using Ode.NET; 36using Ode.NET;
38using OpenSim.Framework; 37using OpenSim.Framework;
39using OpenSim.Region.Physics.Manager; 38using OpenSim.Region.Physics.Manager;
40using libsecondlife; 39using OpenMetaverse;
41 40
42//using OpenSim.Region.Physics.OdePlugin.Meshing; 41//using OpenSim.Region.Physics.OdePlugin.Meshing;
43 42
@@ -1129,11 +1128,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1129 siz.X = size.X; 1128 siz.X = size.X;
1130 siz.Y = size.Y; 1129 siz.Y = size.Y;
1131 siz.Z = size.Z; 1130 siz.Z = size.Z;
1132 Quaternion rot = new Quaternion(); 1131 Quaternion rot = rotation;
1133 rot.w = rotation.w;
1134 rot.x = rotation.x;
1135 rot.y = rotation.y;
1136 rot.z = rotation.z;
1137 1132
1138 OdePrim newPrim; 1133 OdePrim newPrim;
1139 lock (OdeLock) 1134 lock (OdeLock)
@@ -1524,8 +1519,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1524 // but we still need to check for sculptie meshing being enabled so this is the most 1519 // but we still need to check for sculptie meshing being enabled so this is the most
1525 // convenient place to do it for now... 1520 // convenient place to do it for now...
1526 1521
1527 // //if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle && pbs.ProfileCurve == (byte)LLObject.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f) 1522 // //if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle && pbs.ProfileCurve == (byte)Primitive.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f)
1528 // //Console.WriteLine("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + LLObject.UnpackPathScale(pbs.PathScaleY).ToString()); 1523 // //Console.WriteLine("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + Primitive.UnpackPathScale(pbs.PathScaleY).ToString());
1529 if (pbs.SculptEntry && !meshSculptedPrim) 1524 if (pbs.SculptEntry && !meshSculptedPrim)
1530 { 1525 {
1531 return false; 1526 return false;
@@ -1555,19 +1550,19 @@ namespace OpenSim.Region.Physics.OdePlugin
1555 // return true; 1550 // return true;
1556 1551
1557 // // test for torus 1552 // // test for torus
1558 // if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle 1553 // if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle
1559 // && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.Circle 1554 // && (pbs.ProfileCurve & 0x07) == (byte)Primitive.ProfileCurve.Circle
1560 // && LLObject.UnpackPathScale(pbs.PathScaleY) <= 0.75f) 1555 // && Primitive.UnpackPathScale(pbs.PathScaleY) <= 0.75f)
1561 // return true; 1556 // return true;
1562 1557
1563 // // test for tube 1558 // // test for tube
1564 // if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle 1559 // if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle
1565 // && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.EqualTriangle) 1560 // && (pbs.ProfileCurve & 0x07) == (byte)Primitive.ProfileCurve.EqualTriangle)
1566 // return true; 1561 // return true;
1567 1562
1568 // // test for ring 1563 // // test for ring
1569 // if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle 1564 // if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle
1570 // && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.EqualTriangle) 1565 // && (pbs.ProfileCurve & 0x07) == (byte)Primitive.ProfileCurve.EqualTriangle)
1571 // return true; 1566 // return true;
1572 1567
1573 // if (pbs.ProfileShape == ProfileShape.EquilateralTriangle) 1568 // if (pbs.ProfileShape == ProfileShape.EquilateralTriangle)
@@ -2132,17 +2127,17 @@ namespace OpenSim.Region.Physics.OdePlugin
2132 2127
2133 d.Matrix3 R = new d.Matrix3(); 2128 d.Matrix3 R = new d.Matrix3();
2134 2129
2135 Quaternion q1 = Quaternion.FromAngleAxis(1.5707f, new Vector3(1, 0, 0)); 2130 Quaternion q1 = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 1.5707f);
2136 Quaternion q2 = Quaternion.FromAngleAxis(1.5707f, new Vector3(0, 1, 0)); 2131 Quaternion q2 = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 1.5707f);
2137 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1)); 2132 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1));
2138 2133
2139 q1 = q1*q2; 2134 q1 = q1*q2;
2140 //q1 = q1 * q3; 2135 //q1 = q1 * q3;
2141 Vector3 v3 = new Vector3(); 2136 Vector3 v3;
2142 float angle = 0; 2137 float angle;
2143 q1.ToAngleAxis(ref angle, ref v3); 2138 q1.GetAxisAngle(out v3, out angle);
2144 2139
2145 d.RFromAxisAndAngle(out R, v3.x, v3.y, v3.z, angle); 2140 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
2146 d.GeomSetRotation(LandGeom, ref R); 2141 d.GeomSetRotation(LandGeom, ref R);
2147 d.GeomSetPosition(LandGeom, 128, 128, 0); 2142 d.GeomSetPosition(LandGeom, 128, 128, 0);
2148 } 2143 }
@@ -2197,17 +2192,17 @@ namespace OpenSim.Region.Physics.OdePlugin
2197 2192
2198 d.Matrix3 R = new d.Matrix3(); 2193 d.Matrix3 R = new d.Matrix3();
2199 2194
2200 Quaternion q1 = Quaternion.FromAngleAxis(1.5707f, new Vector3(1, 0, 0)); 2195 Quaternion q1 = Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), 1.5707f);
2201 Quaternion q2 = Quaternion.FromAngleAxis(1.5707f, new Vector3(0, 1, 0)); 2196 Quaternion q2 = Quaternion.CreateFromAxisAngle(new Vector3(0, 1, 0), 1.5707f);
2202 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1)); 2197 //Axiom.Math.Quaternion q3 = Axiom.Math.Quaternion.FromAngleAxis(3.14f, new Axiom.Math.Vector3(0, 0, 1));
2203 2198
2204 q1 = q1 * q2; 2199 q1 = q1 * q2;
2205 //q1 = q1 * q3; 2200 //q1 = q1 * q3;
2206 Vector3 v3 = new Vector3(); 2201 Vector3 v3;
2207 float angle = 0; 2202 float angle;
2208 q1.ToAngleAxis(ref angle, ref v3); 2203 q1.GetAxisAngle(out v3, out angle);
2209 2204
2210 d.RFromAxisAndAngle(out R, v3.x, v3.y, v3.z, angle); 2205 d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
2211 d.GeomSetRotation(WaterGeom, ref R); 2206 d.GeomSetRotation(WaterGeom, ref R);
2212 d.GeomSetPosition(WaterGeom, 128, 128, 0); 2207 d.GeomSetPosition(WaterGeom, 128, 128, 0);
2213 } 2208 }