diff options
author | Robert Adams | 2013-09-09 14:53:16 -0700 |
---|---|---|
committer | Robert Adams | 2013-09-11 09:12:19 -0700 |
commit | c5eabb28b4c933cfacefa85381e290372fbc094e (patch) | |
tree | c79acadaa6de935d18865a1bc0d5c9162e23747a /OpenSim/Region/Physics/BulletSPlugin/BSConstraintSpring.cs | |
parent | BulletSim: add extended physics LSL constants for axis specification. (diff) | |
download | opensim-SC-c5eabb28b4c933cfacefa85381e290372fbc094e.zip opensim-SC-c5eabb28b4c933cfacefa85381e290372fbc094e.tar.gz opensim-SC-c5eabb28b4c933cfacefa85381e290372fbc094e.tar.bz2 opensim-SC-c5eabb28b4c933cfacefa85381e290372fbc094e.tar.xz |
BulletSim: add LSL function and plumbing for setting a spring
equilibrium point in the physics engine constraint.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSConstraintSpring.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintSpring.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintSpring.cs index 652c94a..8e7ddff 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintSpring.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintSpring.cs | |||
@@ -85,6 +85,19 @@ public sealed class BSConstraintSpring : BSConstraint6Dof | |||
85 | return true; | 85 | return true; |
86 | } | 86 | } |
87 | 87 | ||
88 | public bool SetEquilibriumPoint(Vector3 linearEq, Vector3 angularEq) | ||
89 | { | ||
90 | PhysicsScene.DetailLog("{0},BSConstraintSpring.SetEquilibriumPoint,obj1ID={1},obj2ID={2},linearEq={3},angularEq={4}", | ||
91 | m_body1.ID, m_body1.ID, m_body2.ID, linearEq, angularEq); | ||
92 | PhysicsScene.PE.SpringSetEquilibriumPoint(m_constraint, 0, linearEq.X); | ||
93 | PhysicsScene.PE.SpringSetEquilibriumPoint(m_constraint, 1, linearEq.Y); | ||
94 | PhysicsScene.PE.SpringSetEquilibriumPoint(m_constraint, 2, linearEq.Z); | ||
95 | PhysicsScene.PE.SpringSetEquilibriumPoint(m_constraint, 3, angularEq.X); | ||
96 | PhysicsScene.PE.SpringSetEquilibriumPoint(m_constraint, 4, angularEq.Y); | ||
97 | PhysicsScene.PE.SpringSetEquilibriumPoint(m_constraint, 5, angularEq.Z); | ||
98 | return true; | ||
99 | } | ||
100 | |||
88 | } | 101 | } |
89 | 102 | ||
90 | } \ No newline at end of file | 103 | } \ No newline at end of file |