partially revert commit f29d5ad662387b97d9e881f28df584dc19fa8c07: if mesh asset does not contain data for PRIM type warn and use convex, do avoid physical peims going underground etc
parent
07893ec3e7
commit
7ebc08ad65
|
@ -395,6 +395,10 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName);
|
// m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName);
|
||||||
|
|
||||||
|
|
||||||
|
// for ubOde we have a diferent mesh use priority
|
||||||
|
// priority is to use full mesh then decomposition
|
||||||
|
// SL does the oposite
|
||||||
bool usemesh = false;
|
bool usemesh = false;
|
||||||
|
|
||||||
coords = new List<Coord>();
|
coords = new List<Coord>();
|
||||||
|
@ -443,17 +447,11 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
|
|
||||||
if (physicsParms != null)
|
if (physicsParms != null)
|
||||||
usemesh = true;
|
usemesh = true;
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.WarnFormat("[MESH]: Data for PRIM shape type not found for prim {0}",primName);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!usemesh && (map.ContainsKey("physics_convex")))
|
if(!usemesh && (map.ContainsKey("physics_convex")))
|
||||||
physicsParms = (OSDMap)map["physics_convex"];
|
physicsParms = (OSDMap)map["physics_convex"];
|
||||||
|
|
||||||
|
|
||||||
if (physicsParms == null)
|
if (physicsParms == null)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[MESH]: unknown mesh type for prim {0}",primName);
|
m_log.WarnFormat("[MESH]: unknown mesh type for prim {0}",primName);
|
||||||
|
@ -555,7 +553,10 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
range = range - min;
|
range = range - min;
|
||||||
range *= invMaxU16;
|
range *= invMaxU16;
|
||||||
|
|
||||||
if (!convex && cmap.ContainsKey("HullList") && cmap.ContainsKey("Positions"))
|
if(!convex)
|
||||||
|
{
|
||||||
|
// if mesh data not present and not convex then we need convex decomposition data
|
||||||
|
if (cmap.ContainsKey("HullList") && cmap.ContainsKey("Positions"))
|
||||||
{
|
{
|
||||||
List<int> hsizes = new List<int>();
|
List<int> hsizes = new List<int>();
|
||||||
int totalpoints = 0;
|
int totalpoints = 0;
|
||||||
|
@ -624,7 +625,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
vs.Clear();
|
vs.Clear();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (!HullUtils.ComputeHull(vs, ref hullr, 0, 0.0f))
|
if (!HullUtils.ComputeHull(vs, ref hullr, 0, 0.0f))
|
||||||
{
|
{
|
||||||
vs.Clear();
|
vs.Clear();
|
||||||
|
@ -662,7 +663,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
f = new Face(vertsoffset + t1, vertsoffset + t2, vertsoffset + t3);
|
f = new Face(vertsoffset + t1, vertsoffset + t2, vertsoffset + t3);
|
||||||
faces.Add(f);
|
faces.Add(f);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
List<int> indices;
|
List<int> indices;
|
||||||
if (!HullUtils.ComputeHull(vs, out indices))
|
if (!HullUtils.ComputeHull(vs, out indices))
|
||||||
{
|
{
|
||||||
|
@ -708,7 +709,12 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
if (coords.Count > 0 && faces.Count > 0)
|
if (coords.Count > 0 && faces.Count > 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if neither mesh or decomposition present, warn and use convex
|
||||||
|
m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName);
|
||||||
|
}
|
||||||
|
}
|
||||||
vs.Clear();
|
vs.Clear();
|
||||||
|
|
||||||
if (cmap.ContainsKey("BoundingVerts"))
|
if (cmap.ContainsKey("BoundingVerts"))
|
||||||
|
|
Loading…
Reference in New Issue