aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
diff options
context:
space:
mode:
authorDahlia Trimble2008-08-27 09:49:13 +0000
committerDahlia Trimble2008-08-27 09:49:13 +0000
commit36d1720fde3463ea97154ab81a8a70b19f869f63 (patch)
tree54e9d2fa017ab6415704e381d975ccf8cf5beb10 /OpenSim/Region/Physics/Meshing/Meshmerizer.cs
parentAdded some exception trapping to PrimMesher (diff)
downloadopensim-SC-36d1720fde3463ea97154ab81a8a70b19f869f63.zip
opensim-SC-36d1720fde3463ea97154ab81a8a70b19f869f63.tar.gz
opensim-SC-36d1720fde3463ea97154ab81a8a70b19f869f63.tar.bz2
opensim-SC-36d1720fde3463ea97154ab81a8a70b19f869f63.tar.xz
reverting to prior meshing methods until some physics timing issues can be resolved
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs32
1 files changed, 17 insertions, 15 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 4b2fb16..03c98f0 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -52,6 +52,8 @@ namespace OpenSim.Region.Physics.Meshing
52 52
53 public class Meshmerizer : IMesher 53 public class Meshmerizer : IMesher
54 { 54 {
55 private bool usePrimMesher = false;
56
55 //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 57 //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
56 58
57 // Setting baseDir to a path will enable the dumping of raw files 59 // Setting baseDir to a path will enable the dumping of raw files
@@ -2010,7 +2012,7 @@ namespace OpenSim.Region.Physics.Meshing
2010 //CalcNormals(mesh); 2012 //CalcNormals(mesh);
2011 } 2013 }
2012 2014
2013 else if (true) 2015 else if (usePrimMesher)
2014 { 2016 {
2015 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); 2017 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
2016 } 2018 }
@@ -2018,15 +2020,15 @@ namespace OpenSim.Region.Physics.Meshing
2018 { 2020 {
2019 if (primShape.PathCurve == (byte)Extrusion.Straight) 2021 if (primShape.PathCurve == (byte)Extrusion.Straight)
2020 { // its a box 2022 { // its a box
2021 //mesh = CreateBoxMesh(primName, primShape, size); 2023 mesh = CreateBoxMesh(primName, primShape, size);
2022 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); 2024 //mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
2023 //CalcNormals(mesh); 2025 //CalcNormals(mesh);
2024 } 2026 }
2025 else if (primShape.PathCurve == (byte)Extrusion.Curve1) 2027 else if (primShape.PathCurve == (byte)Extrusion.Curve1)
2026 { // tube 2028 { // tube
2027 // do a cylinder for now 2029 // do a cylinder for now
2028 //mesh = CreateCylinderMesh(primName, primShape, size); 2030 mesh = CreateCylinderMesh(primName, primShape, size);
2029 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); 2031 //mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
2030 //CalcNormals(mesh); 2032 //CalcNormals(mesh);
2031 } 2033 }
2032 } 2034 }
@@ -2034,16 +2036,16 @@ namespace OpenSim.Region.Physics.Meshing
2034 { 2036 {
2035 if (primShape.PathCurve == (byte)Extrusion.Straight) 2037 if (primShape.PathCurve == (byte)Extrusion.Straight)
2036 { 2038 {
2037 //mesh = CreateCylinderMesh(primName, primShape, size); 2039 mesh = CreateCylinderMesh(primName, primShape, size);
2038 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); 2040 //mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
2039 //CalcNormals(mesh); 2041 //CalcNormals(mesh);
2040 } 2042 }
2041 2043
2042 // ProfileCurve seems to combine hole shape and profile curve so we need to only compare against the lower 3 bits 2044 // ProfileCurve seems to combine hole shape and profile curve so we need to only compare against the lower 3 bits
2043 else if (primShape.PathCurve == (byte) Extrusion.Curve1) 2045 else if (primShape.PathCurve == (byte) Extrusion.Curve1)
2044 { // dahlia's favorite, a torus :) 2046 { // dahlia's favorite, a torus :)
2045 //mesh = CreateCircularPathMesh(primName, primShape, size); 2047 mesh = CreateCircularPathMesh(primName, primShape, size);
2046 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); 2048 //mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
2047 //CalcNormals(mesh); 2049 //CalcNormals(mesh);
2048 } 2050 }
2049 } 2051 }
@@ -2052,8 +2054,8 @@ namespace OpenSim.Region.Physics.Meshing
2052 if (primShape.PathCurve == (byte)Extrusion.Curve1 || primShape.PathCurve == (byte) Extrusion.Curve2) 2054 if (primShape.PathCurve == (byte)Extrusion.Curve1 || primShape.PathCurve == (byte) Extrusion.Curve2)
2053 { 2055 {
2054 //mesh = CreateSphereMesh(primName, primShape, size); 2056 //mesh = CreateSphereMesh(primName, primShape, size);
2055 //mesh = CreateCircularPathMesh(primName, primShape, size); 2057 mesh = CreateCircularPathMesh(primName, primShape, size);
2056 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); 2058 //mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
2057 //CalcNormals(mesh); 2059 //CalcNormals(mesh);
2058 } 2060 }
2059 } 2061 }
@@ -2061,15 +2063,15 @@ namespace OpenSim.Region.Physics.Meshing
2061 { 2063 {
2062 if (primShape.PathCurve == (byte)Extrusion.Straight) 2064 if (primShape.PathCurve == (byte)Extrusion.Straight)
2063 { 2065 {
2064 //mesh = CreatePrismMesh(primName, primShape, size); 2066 mesh = CreatePrismMesh(primName, primShape, size);
2065 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); 2067 //mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
2066 //CalcNormals(mesh); 2068 //CalcNormals(mesh);
2067 } 2069 }
2068 else if (primShape.PathCurve == (byte) Extrusion.Curve1) 2070 else if (primShape.PathCurve == (byte) Extrusion.Curve1)
2069 { // a ring - do a cylinder for now 2071 { // a ring - do a cylinder for now
2070 //mesh = CreateCylinderMesh(primName, primShape, size); 2072 //mesh = CreateCylinderMesh(primName, primShape, size);
2071 //mesh = CreateCircularPathMesh(primName, primShape, size); 2073 mesh = CreateCircularPathMesh(primName, primShape, size);
2072 mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod); 2074 //mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod);
2073 //CalcNormals(mesh); 2075 //CalcNormals(mesh);
2074 } 2076 }
2075 } 2077 }