aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-16 20:16:33 +0000
committerTeravus Ovares2008-05-16 20:16:33 +0000
commit00a1f0bab0d764017677672c19d4509c1af3e622 (patch)
tree7faeea9a37a86ae2395f3d87625ca255a1c0bf25 /OpenSim/Region/Physics/Meshing
parentprime the wearables structure, which should fix the exception (diff)
downloadopensim-SC-00a1f0bab0d764017677672c19d4509c1af3e622.zip
opensim-SC-00a1f0bab0d764017677672c19d4509c1af3e622.tar.gz
opensim-SC-00a1f0bab0d764017677672c19d4509c1af3e622.tar.bz2
opensim-SC-00a1f0bab0d764017677672c19d4509c1af3e622.tar.xz
* This finishes the ODE options section of the OpenSim.ini.example. I've added 44 configurable options!
* This includes if you want to mesh sculpties and the Level of detail on the sculptie meshing for non physical and a separate LOD on physical sculpties. * The options range from gravity.. to avatar movement speed, to friction management.. to object density.. to update throttling.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs9
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs9
2 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 4bf12c9..ba4f941 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -1295,9 +1295,9 @@ namespace OpenSim.Region.Physics.Meshing
1295 1295
1296 return m; 1296 return m;
1297 } 1297 }
1298 private SculptMesh CreateSculptMesh(string primName, PrimitiveBaseShape primShape, PhysicsVector size) 1298 private SculptMesh CreateSculptMesh(string primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod)
1299 { 1299 {
1300 SculptMesh sm = new SculptMesh(primShape.SculptData); 1300 SculptMesh sm = new SculptMesh(primShape.SculptData, lod);
1301 // Scale the mesh based on our prim scale 1301 // Scale the mesh based on our prim scale
1302 foreach (Vertex v in sm.vertices) 1302 foreach (Vertex v in sm.vertices)
1303 { 1303 {
@@ -1422,12 +1422,13 @@ namespace OpenSim.Region.Physics.Meshing
1422 } 1422 }
1423 } 1423 }
1424 1424
1425 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) 1425 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod)
1426 { 1426 {
1427 Mesh mesh = null; 1427 Mesh mesh = null;
1428 if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0) 1428 if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0)
1429 { 1429 {
1430 SculptMesh smesh = CreateSculptMesh(primName, primShape, size); 1430
1431 SculptMesh smesh = CreateSculptMesh(primName, primShape, size, lod);
1431 mesh = (Mesh)smesh; 1432 mesh = (Mesh)smesh;
1432 CalcNormals(mesh); 1433 CalcNormals(mesh);
1433 } 1434 }
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index 924c4d3..1c4db15 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -48,8 +48,11 @@ namespace OpenSim.Region.Physics.Meshing
48 private int lod = 32; 48 private int lod = 32;
49 private const float RANGE = 128.0f; 49 private const float RANGE = 128.0f;
50 50
51 public SculptMesh(byte[] jpegData) 51 public SculptMesh(byte[] jpegData, float _lod)
52 { 52 {
53 if (_lod == 2f || _lod == 4f || _lod == 8f || _lod == 16f || _lod == 32f || _lod == 64f)
54 lod = (int)_lod;
55
53 idata = OpenJPEG.DecodeToImage(jpegData); 56 idata = OpenJPEG.DecodeToImage(jpegData);
54 if (idata != null) 57 if (idata != null)
55 { 58 {
@@ -61,6 +64,10 @@ namespace OpenSim.Region.Physics.Meshing
61 LoadPoles(); 64 LoadPoles();
62 65
63 processSculptTexture(); 66 processSculptTexture();
67
68 bLOD.Dispose();
69 bBitmap.Dispose();
70 idata.Dispose();
64 } 71 }
65 } 72 }
66 73