BulletSim: add osGetPhysicsEngineType() LSL function and update

the physics engines to return the name that is specified in the INI
file ("physics = XXX") as the type of engine.
This os function is a little different than the others in that it
does not throw an exception of one is not privilaged to use it.
It merely returns an empty string.
This commit is contained in:
Robert Adams
2013-01-10 17:03:19 -08:00
parent 93adc4cb66
commit eacc2561d1
12 changed files with 82 additions and 22 deletions

View File

@@ -59,7 +59,7 @@ public class BSPlugin : IPhysicsPlugin
{
if (_mScene == null)
{
_mScene = new BSScene(sceneIdentifier);
_mScene = new BSScene(GetName(), sceneIdentifier);
}
return (_mScene);
}

View File

@@ -167,11 +167,16 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
public bool VehiclePhysicalLoggingEnabled { get; private set; }
#region Construction and Initialization
public BSScene(string identifier)
public BSScene(string engineType, string identifier)
{
m_initialized = false;
// we are passed the name of the region we're working for.
// The name of the region we're working for is passed to us. Keep for identification.
RegionName = identifier;
// Set identifying variables in the PhysicsScene interface.
EngineType = engineType;
Name = EngineType + "/" + RegionName;
}
public override void Initialise(IMesher meshmerizer, IConfigSource config)