*feature test* ubitode, let convex hull shape type work for prims other
than uploaded meshs, making it change the mesh level of detail from high to low. This will work on all prims that get a internal mesh or sculpts. Mesh size reduction will depend on particular shape. This is not as SL. There prims do also get concave areas. Uploaded meshs work as before. A normal 10x10x10 torus gets 152 vertices in place of 900, and 198 faces in place of 1198.avinationmerge
parent
8ad1d79003
commit
92d44446fa
|
@ -1092,17 +1092,20 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
CalcPrimBodyData();
|
CalcPrimBodyData();
|
||||||
|
|
||||||
m_mesh = null;
|
m_mesh = null;
|
||||||
if (_parent_scene.needsMeshing(pbs))
|
if (_parent_scene.needsMeshing(pbs) && (pbs.SculptData.Length > 0))
|
||||||
{
|
{
|
||||||
bool convex;
|
bool convex;
|
||||||
|
int clod = (int)LevelOfDetail.High;
|
||||||
if (m_shapetype == 0)
|
if (m_shapetype == 0)
|
||||||
convex = false;
|
convex = false;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
convex = true;
|
convex = true;
|
||||||
|
if (_pbs.SculptType != (byte)SculptType.Mesh)
|
||||||
m_mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, (int)LevelOfDetail.High, true, convex);
|
clod = (int)LevelOfDetail.Low;
|
||||||
|
}
|
||||||
|
m_mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, clod, true, convex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_building = true; // control must set this to false when done
|
m_building = true; // control must set this to false when done
|
||||||
|
|
||||||
|
@ -1360,12 +1363,18 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
if (m_mesh == null)
|
if (m_mesh == null)
|
||||||
{
|
{
|
||||||
bool convex;
|
bool convex;
|
||||||
|
int clod = (int)LevelOfDetail.High;
|
||||||
|
|
||||||
if (m_shapetype == 0)
|
if (m_shapetype == 0)
|
||||||
convex = false;
|
convex = false;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
convex = true;
|
convex = true;
|
||||||
|
if (_pbs.SculptType != (byte)SculptType.Mesh)
|
||||||
|
clod = (int)LevelOfDetail.Low;
|
||||||
|
}
|
||||||
|
|
||||||
mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, (int)LevelOfDetail.High, true, convex);
|
mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, clod, true, convex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue