From 53026affb315816280ef8649e0f9694e81280540 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 11 Apr 2009 00:11:54 +0000 Subject: * Instead of referencing mesh stuff in the physics plugin.. change the IMesh Interface. (blame prebuild) --- .../Physics/BulletDotNETPlugin/BulletDotNETPrim.cs | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Physics/BulletDotNETPlugin') 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; using BulletDotNET; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; -using OpenSim.Region.Physics.Meshing; + namespace OpenSim.Region.Physics.BulletDotNETPlugin { @@ -1012,8 +1012,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin IMesh mesh = _parent_scene.mesher.CreateMesh(SOPName, _pbs, _size, meshlod, IsPhysical); if (!positionOffset.IsIdentical(PhysicsVector.Zero,0.001f) || orientation != Quaternion.Identity) { - if (mesh is Mesh) - { + float[] xyz = new float[3]; xyz[0] = positionOffset.X; xyz[1] = positionOffset.Y; @@ -1033,10 +1032,10 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin matrix[2, 1] = m4.M32; matrix[2, 2] = m4.M33; - Mesh mesh2 = (Mesh) mesh; - mesh2.TransformLinear(matrix, xyz); - mesh = (IMesh)mesh2; - } + + mesh.TransformLinear(matrix, xyz); + + } @@ -2120,7 +2119,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin ProcessGeomCreationAsTriMesh(PhysicsVector.Zero, Quaternion.Identity); // createmesh returns null when it doesn't mesh. - + /* if (_mesh is Mesh) { } @@ -2129,7 +2128,9 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin m_log.Warn("[PHYSICS]: Can't link a OpenSim.Region.Physics.Meshing.Mesh object"); return; } - Mesh pMesh = (Mesh) _mesh; + */ + + foreach (BulletDotNETPrim chld in childrenPrim) { @@ -2141,13 +2142,12 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin //pos *= Orientation; offset.setValues(pos.X, pos.Y, pos.Z); chld.ProcessGeomCreationAsTriMesh(offset, chld.Orientation); - if (chld._mesh is Mesh) - { - pMesh.Append((Mesh)chld._mesh); - } + + _mesh.Append(chld._mesh); + } - setMesh(_parent_scene, pMesh); + setMesh(_parent_scene, _mesh); //} -- cgit v1.1