add OSSL functions to override linksets total mass, center of mass and inertia. replacing the crude automatic estimation based on prims known to physics and density. Changed parameters are still not saved, and are lost on region crossings. only suported by UbODE. EXPERIMENTAL feature, only test it for now.. don't try to use in products.

This commit is contained in:
UbitUmarov
2017-03-31 20:55:48 +01:00
parent b033a2559e
commit 6a35a965ff
6 changed files with 530 additions and 45 deletions

View File

@@ -1114,5 +1114,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
m_OSSL_Functions.osVolumeDetect(detect);
}
public LSL_List osGetInertiaData()
{
return m_OSSL_Functions.osGetInertiaData();
}
public void osSetInertiaAsBox(LSL_Float mass, vector boxSize, vector centerOfMass, rotation rot)
{
m_OSSL_Functions.osSetInertiaAsBox(mass, boxSize, centerOfMass, rot);
}
public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, vector centerOfMass)
{
m_OSSL_Functions.osSetInertiaAsSphere(mass, radius, centerOfMass);
}
public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, vector centerOfMass,rotation lslrot)
{
m_OSSL_Functions.osSetInertiaAsCylinder( mass, radius, lenght, centerOfMass, lslrot);
}
public void osClearInertia()
{
m_OSSL_Functions.osClearInertia();
}
}
}