diff options
Diffstat (limited to 'OpenSim')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 28 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 1 |
3 files changed, 24 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index 8f973f4..3a92f93 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | |||
@@ -36,21 +36,29 @@ public abstract class BSLinkset | |||
36 | { | 36 | { |
37 | // private static string LogHeader = "[BULLETSIM LINKSET]"; | 37 | // private static string LogHeader = "[BULLETSIM LINKSET]"; |
38 | 38 | ||
39 | public enum LinksetImplementation | ||
40 | { | ||
41 | Constraint = 0, // linkset tied together with constraints | ||
42 | Compound = 1, // linkset tied together as a compound object | ||
43 | Manual = 2 // linkset tied together manually (code moves all the pieces) | ||
44 | } | ||
39 | // Create the correct type of linkset for this child | 45 | // Create the correct type of linkset for this child |
40 | public static BSLinkset Factory(BSScene physScene, BSPhysObject parent) | 46 | public static BSLinkset Factory(BSScene physScene, BSPhysObject parent) |
41 | { | 47 | { |
42 | BSLinkset ret = null; | 48 | BSLinkset ret = null; |
43 | /* | ||
44 | if (parent.IsPhysical) | ||
45 | ret = new BSLinksetConstraints(physScene, parent); | ||
46 | else | ||
47 | ret = new BSLinksetManual(physScene, parent); | ||
48 | */ | ||
49 | |||
50 | // at the moment, there is only one | ||
51 | // ret = new BSLinksetConstraints(physScene, parent); | ||
52 | ret = new BSLinksetCompound(physScene, parent); | ||
53 | 49 | ||
50 | switch ((int)physScene.Params.linksetImplementation) | ||
51 | { | ||
52 | case (int)LinksetImplementation.Compound: | ||
53 | ret = new BSLinksetCompound(physScene, parent); | ||
54 | break; | ||
55 | case (int)LinksetImplementation.Manual: | ||
56 | // ret = new BSLinksetManual(physScene, parent); | ||
57 | break; | ||
58 | default: | ||
59 | ret = new BSLinksetConstraints(physScene, parent); | ||
60 | break; | ||
61 | } | ||
54 | return ret; | 62 | return ret; |
55 | } | 63 | } |
56 | 64 | ||
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index dcfcb83..13aa860 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -1214,6 +1214,11 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
1214 | (s) => { return s.m_params[0].numberOfSolverIterations; }, | 1214 | (s) => { return s.m_params[0].numberOfSolverIterations; }, |
1215 | (s,p,l,v) => { s.m_params[0].numberOfSolverIterations = v; } ), | 1215 | (s,p,l,v) => { s.m_params[0].numberOfSolverIterations = v; } ), |
1216 | 1216 | ||
1217 | new ParameterDefn("LinksetImplementation", "Type of linkset implementation (0=Constraint, 1=Compound)", | ||
1218 | (float)BSLinkset.LinksetImplementation.Constraint, | ||
1219 | (s,cf,p,v) => { s.m_params[0].linksetImplementation = cf.GetFloat(p,v); }, | ||
1220 | (s) => { return s.m_params[0].linksetImplementation; }, | ||
1221 | (s,p,l,v) => { s.m_params[0].linksetImplementation = v; } ), | ||
1217 | new ParameterDefn("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.", | 1222 | new ParameterDefn("LinkConstraintUseFrameOffset", "For linksets built with constraints, enable frame offsetFor linksets built with constraints, enable frame offset.", |
1218 | ConfigurationParameters.numericFalse, | 1223 | ConfigurationParameters.numericFalse, |
1219 | (s,cf,p,v) => { s.m_params[0].linkConstraintUseFrameOffset = s.NumericBool(cf.GetBoolean(p, s.BoolNumeric(v))); }, | 1224 | (s,cf,p,v) => { s.m_params[0].linkConstraintUseFrameOffset = s.NumericBool(cf.GetBoolean(p, s.BoolNumeric(v))); }, |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index 143b8be..ac6d2b2 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |||
@@ -300,6 +300,7 @@ public struct ConfigurationParameters | |||
300 | public float shouldEnableFrictionCaching; | 300 | public float shouldEnableFrictionCaching; |
301 | public float numberOfSolverIterations; | 301 | public float numberOfSolverIterations; |
302 | 302 | ||
303 | public float linksetImplementation; | ||
303 | public float linkConstraintUseFrameOffset; | 304 | public float linkConstraintUseFrameOffset; |
304 | public float linkConstraintEnableTransMotor; | 305 | public float linkConstraintEnableTransMotor; |
305 | public float linkConstraintTransMotorMaxVel; | 306 | public float linkConstraintTransMotorMaxVel; |