* 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.
This commit is contained in:
Teravus Ovares
2008-05-16 20:16:33 +00:00
parent f99b4cbe3b
commit 00a1f0bab0
8 changed files with 150 additions and 48 deletions

View File

@@ -1295,9 +1295,9 @@ namespace OpenSim.Region.Physics.Meshing
return m;
}
private SculptMesh CreateSculptMesh(string primName, PrimitiveBaseShape primShape, PhysicsVector size)
private SculptMesh CreateSculptMesh(string primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod)
{
SculptMesh sm = new SculptMesh(primShape.SculptData);
SculptMesh sm = new SculptMesh(primShape.SculptData, lod);
// Scale the mesh based on our prim scale
foreach (Vertex v in sm.vertices)
{
@@ -1422,12 +1422,13 @@ namespace OpenSim.Region.Physics.Meshing
}
}
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size)
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod)
{
Mesh mesh = null;
if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0)
{
SculptMesh smesh = CreateSculptMesh(primName, primShape, size);
SculptMesh smesh = CreateSculptMesh(primName, primShape, size, lod);
mesh = (Mesh)smesh;
CalcNormals(mesh);
}

View File

@@ -48,8 +48,11 @@ namespace OpenSim.Region.Physics.Meshing
private int lod = 32;
private const float RANGE = 128.0f;
public SculptMesh(byte[] jpegData)
public SculptMesh(byte[] jpegData, float _lod)
{
if (_lod == 2f || _lod == 4f || _lod == 8f || _lod == 16f || _lod == 32f || _lod == 64f)
lod = (int)_lod;
idata = OpenJPEG.DecodeToImage(jpegData);
if (idata != null)
{
@@ -61,6 +64,10 @@ namespace OpenSim.Region.Physics.Meshing
LoadPoles();
processSculptTexture();
bLOD.Dispose();
bBitmap.Dispose();
idata.Dispose();
}
}