mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user