diff options
Diffstat (limited to 'OpenSim/Region/Physics/UbitMeshing')
-rw-r--r-- | OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs | 17 |
1 files changed, 10 insertions, 7 deletions
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 | |||
257 | /// <param name="size"></param> | 257 | /// <param name="size"></param> |
258 | /// <param name="lod"></param> | 258 | /// <param name="lod"></param> |
259 | /// <returns></returns> | 259 | /// <returns></returns> |
260 | private Mesh CreateMeshFromPrimMesher(string primName, PrimitiveBaseShape primShape, Vector3 size, float lod) | 260 | private Mesh CreateMeshFromPrimMesher(string primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool convex) |
261 | { | 261 | { |
262 | // m_log.DebugFormat( | 262 | // m_log.DebugFormat( |
263 | // "[MESH]: Creating physics proxy for {0}, shape {1}", | 263 | // "[MESH]: Creating physics proxy for {0}, shape {1}", |
@@ -273,7 +273,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
273 | if (!useMeshiesPhysicsMesh) | 273 | if (!useMeshiesPhysicsMesh) |
274 | return null; | 274 | return null; |
275 | 275 | ||
276 | if (!GenerateCoordsAndFacesFromPrimMeshData(primName, primShape, size, out coords, out faces)) | 276 | if (!GenerateCoordsAndFacesFromPrimMeshData(primName, primShape, size, out coords, out faces, convex)) |
277 | return null; | 277 | return null; |
278 | } | 278 | } |
279 | else | 279 | else |
@@ -324,12 +324,10 @@ namespace OpenSim.Region.Physics.Meshing | |||
324 | /// <param name="faces">Faces are added to this list by the method.</param> | 324 | /// <param name="faces">Faces are added to this list by the method.</param> |
325 | /// <returns>true if coords and faces were successfully generated, false if not</returns> | 325 | /// <returns>true if coords and faces were successfully generated, false if not</returns> |
326 | private bool GenerateCoordsAndFacesFromPrimMeshData( | 326 | private bool GenerateCoordsAndFacesFromPrimMeshData( |
327 | string primName, PrimitiveBaseShape primShape, Vector3 size, out List<Coord> coords, out List<Face> faces) | 327 | string primName, PrimitiveBaseShape primShape, Vector3 size, out List<Coord> coords, out List<Face> faces, bool convex) |
328 | { | 328 | { |
329 | // m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName); | 329 | // m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName); |
330 | 330 | ||
331 | |||
332 | bool convex = false; // this will be a input | ||
333 | bool usemesh = false; | 331 | bool usemesh = false; |
334 | 332 | ||
335 | coords = new List<Coord>(); | 333 | coords = new List<Coord>(); |
@@ -978,11 +976,16 @@ namespace OpenSim.Region.Physics.Meshing | |||
978 | 976 | ||
979 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod) | 977 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod) |
980 | { | 978 | { |
981 | return CreateMesh(primName, primShape, size, lod, false); | 979 | return CreateMesh(primName, primShape, size, lod, false,false); |
982 | } | 980 | } |
983 | 981 | ||
984 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical) | 982 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical) |
985 | { | 983 | { |
984 | return CreateMesh(primName, primShape, size, lod, false,false); | ||
985 | } | ||
986 | |||
987 | public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) | ||
988 | { | ||
986 | #if SPAM | 989 | #if SPAM |
987 | m_log.DebugFormat("[MESH]: Creating mesh for {0}", primName); | 990 | m_log.DebugFormat("[MESH]: Creating mesh for {0}", primName); |
988 | #endif | 991 | #endif |
@@ -1000,7 +1003,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
1000 | if (size.Y < 0.01f) size.Y = 0.01f; | 1003 | if (size.Y < 0.01f) size.Y = 0.01f; |
1001 | if (size.Z < 0.01f) size.Z = 0.01f; | 1004 | if (size.Z < 0.01f) size.Z = 0.01f; |
1002 | 1005 | ||
1003 | mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); | 1006 | mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod,convex); |
1004 | 1007 | ||
1005 | if (mesh != null) | 1008 | if (mesh != null) |
1006 | { | 1009 | { |