From 8817b6e74cd792808c4bf1d7c125ff3ecace4d89 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Wed, 21 Mar 2012 00:02:41 +0000
Subject: let convex be a parameter to createMesh so it can be used. Was forced
to add it also to original mesher code and zeromesher
---
OpenSim/Region/Physics/Manager/IMesher.cs | 1 +
OpenSim/Region/Physics/Manager/ZeroMesher.cs | 5 +++++
OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 5 +++++
OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs | 17 ++++++++++-------
4 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs
index cc92484..c32cf38 100644
--- a/OpenSim/Region/Physics/Manager/IMesher.cs
+++ b/OpenSim/Region/Physics/Manager/IMesher.cs
@@ -36,6 +36,7 @@ namespace OpenSim.Region.Physics.Manager
{
IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod);
IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical);
+ IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical,bool convex);
}
// Values for level of detail to be passed to the mesher.
diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs
index ba19db6..8a3b50b 100644
--- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs
+++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs
@@ -67,6 +67,11 @@ namespace OpenSim.Region.Physics.Manager
return CreateMesh(primName, primShape, size, lod, false);
}
+ public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex)
+ {
+ return CreateMesh(primName, primShape, size, lod, false);
+ }
+
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical)
{
// Remove the reference to the encoded JPEG2000 data so it can be GCed
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index c4b245f..5597542 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -717,6 +717,11 @@ namespace OpenSim.Region.Physics.Meshing
return CreateMesh(primName, primShape, size, lod, false);
}
+ public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex)
+ {
+ return CreateMesh(primName, primShape, size, lod, false);
+ }
+
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical)
{
#if SPAM
diff --git a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
index a550342..7667e91 100644
--- a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
@@ -257,7 +257,7 @@ namespace OpenSim.Region.Physics.Meshing
///
///
///
- private Mesh CreateMeshFromPrimMesher(string primName, PrimitiveBaseShape primShape, Vector3 size, float lod)
+ private Mesh CreateMeshFromPrimMesher(string primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool convex)
{
// m_log.DebugFormat(
// "[MESH]: Creating physics proxy for {0}, shape {1}",
@@ -273,7 +273,7 @@ namespace OpenSim.Region.Physics.Meshing
if (!useMeshiesPhysicsMesh)
return null;
- if (!GenerateCoordsAndFacesFromPrimMeshData(primName, primShape, size, out coords, out faces))
+ if (!GenerateCoordsAndFacesFromPrimMeshData(primName, primShape, size, out coords, out faces, convex))
return null;
}
else
@@ -324,12 +324,10 @@ namespace OpenSim.Region.Physics.Meshing
/// Faces are added to this list by the method.
/// true if coords and faces were successfully generated, false if not
private bool GenerateCoordsAndFacesFromPrimMeshData(
- string primName, PrimitiveBaseShape primShape, Vector3 size, out List coords, out List faces)
+ string primName, PrimitiveBaseShape primShape, Vector3 size, out List coords, out List faces, bool convex)
{
// m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName);
-
- bool convex = false; // this will be a input
bool usemesh = false;
coords = new List();
@@ -978,11 +976,16 @@ namespace OpenSim.Region.Physics.Meshing
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod)
{
- return CreateMesh(primName, primShape, size, lod, false);
+ return CreateMesh(primName, primShape, size, lod, false,false);
}
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical)
{
+ return CreateMesh(primName, primShape, size, lod, false,false);
+ }
+
+ public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex)
+ {
#if SPAM
m_log.DebugFormat("[MESH]: Creating mesh for {0}", primName);
#endif
@@ -1000,7 +1003,7 @@ namespace OpenSim.Region.Physics.Meshing
if (size.Y < 0.01f) size.Y = 0.01f;
if (size.Z < 0.01f) size.Z = 0.01f;
- mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
+ mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod,convex);
if (mesh != null)
{
--
cgit v1.1