mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
BulletSim: add extended physics function physGetLinkType(linkNum). Add implementation of physChangeLinkParams() in BSLinksetConstraint.
This commit is contained in:
@@ -64,6 +64,7 @@ public class ExtendedPhysics : INonSharedRegionModule
|
||||
public const string PhysFunctSetLinksetType = "BulletSim.SetLinksetType";
|
||||
public const string PhysFunctChangeLinkFixed = "BulletSim.ChangeLinkFixed";
|
||||
public const string PhysFunctChangeLinkType = "BulletSim.ChangeLinkType";
|
||||
public const string PhysFunctGetLinkType = "BulletSim.GetLinkType";
|
||||
public const string PhysFunctChangeLinkParams = "BulletSim.ChangeLinkParams";
|
||||
|
||||
// =============================================================
|
||||
@@ -320,6 +321,24 @@ public class ExtendedPhysics : INonSharedRegionModule
|
||||
return ret;
|
||||
}
|
||||
|
||||
// physGetLinkType(integer linkNum)
|
||||
[ScriptInvocation]
|
||||
public int physGetLinkType(UUID hostID, UUID scriptID, int linkNum, int typeCode)
|
||||
{
|
||||
int ret = -1;
|
||||
if (!Enabled) return ret;
|
||||
|
||||
PhysicsActor rootPhysActor;
|
||||
PhysicsActor childPhysActor;
|
||||
|
||||
if (GetRootAndChildPhysActors(hostID, linkNum, out rootPhysActor, out childPhysActor))
|
||||
{
|
||||
ret = MakeIntError(rootPhysActor.Extension(PhysFunctGetLinkType, childPhysActor));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// physChangeLinkFixed(integer linkNum)
|
||||
// Change the link between the root and the linkNum into a fixed, static physical connection.
|
||||
[ScriptInvocation]
|
||||
|
||||
Reference in New Issue
Block a user