aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletDotNETPlugin
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletDotNETPlugin')
-rw-r--r--OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
index 0f54a9f..9f68f02 100644
--- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
+++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
@@ -35,7 +35,7 @@ using OpenMetaverse;
35using BulletDotNET; 35using BulletDotNET;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
38using OpenSim.Region.Physics.Meshing; 38
39 39
40namespace OpenSim.Region.Physics.BulletDotNETPlugin 40namespace OpenSim.Region.Physics.BulletDotNETPlugin
41{ 41{
@@ -1012,8 +1012,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
1012 IMesh mesh = _parent_scene.mesher.CreateMesh(SOPName, _pbs, _size, meshlod, IsPhysical); 1012 IMesh mesh = _parent_scene.mesher.CreateMesh(SOPName, _pbs, _size, meshlod, IsPhysical);
1013 if (!positionOffset.IsIdentical(PhysicsVector.Zero,0.001f) || orientation != Quaternion.Identity) 1013 if (!positionOffset.IsIdentical(PhysicsVector.Zero,0.001f) || orientation != Quaternion.Identity)
1014 { 1014 {
1015 if (mesh is Mesh) 1015
1016 {
1017 float[] xyz = new float[3]; 1016 float[] xyz = new float[3];
1018 xyz[0] = positionOffset.X; 1017 xyz[0] = positionOffset.X;
1019 xyz[1] = positionOffset.Y; 1018 xyz[1] = positionOffset.Y;
@@ -1033,10 +1032,10 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
1033 matrix[2, 1] = m4.M32; 1032 matrix[2, 1] = m4.M32;
1034 matrix[2, 2] = m4.M33; 1033 matrix[2, 2] = m4.M33;
1035 1034
1036 Mesh mesh2 = (Mesh) mesh; 1035
1037 mesh2.TransformLinear(matrix, xyz); 1036 mesh.TransformLinear(matrix, xyz);
1038 mesh = (IMesh)mesh2; 1037
1039 } 1038
1040 1039
1041 } 1040 }
1042 1041
@@ -2120,7 +2119,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
2120 ProcessGeomCreationAsTriMesh(PhysicsVector.Zero, Quaternion.Identity); 2119 ProcessGeomCreationAsTriMesh(PhysicsVector.Zero, Quaternion.Identity);
2121 // createmesh returns null when it doesn't mesh. 2120 // createmesh returns null when it doesn't mesh.
2122 2121
2123 2122 /*
2124 if (_mesh is Mesh) 2123 if (_mesh is Mesh)
2125 { 2124 {
2126 } 2125 }
@@ -2129,7 +2128,9 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
2129 m_log.Warn("[PHYSICS]: Can't link a OpenSim.Region.Physics.Meshing.Mesh object"); 2128 m_log.Warn("[PHYSICS]: Can't link a OpenSim.Region.Physics.Meshing.Mesh object");
2130 return; 2129 return;
2131 } 2130 }
2132 Mesh pMesh = (Mesh) _mesh; 2131 */
2132
2133
2133 2134
2134 foreach (BulletDotNETPrim chld in childrenPrim) 2135 foreach (BulletDotNETPrim chld in childrenPrim)
2135 { 2136 {
@@ -2141,13 +2142,12 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
2141 //pos *= Orientation; 2142 //pos *= Orientation;
2142 offset.setValues(pos.X, pos.Y, pos.Z); 2143 offset.setValues(pos.X, pos.Y, pos.Z);
2143 chld.ProcessGeomCreationAsTriMesh(offset, chld.Orientation); 2144 chld.ProcessGeomCreationAsTriMesh(offset, chld.Orientation);
2144 if (chld._mesh is Mesh) 2145
2145 { 2146 _mesh.Append(chld._mesh);
2146 pMesh.Append((Mesh)chld._mesh); 2147
2147 }
2148 2148
2149 } 2149 }
2150 setMesh(_parent_scene, pMesh); 2150 setMesh(_parent_scene, _mesh);
2151 2151
2152 //} 2152 //}
2153 2153