diff options
author | Robert Adams | 2012-09-27 19:57:35 -0700 |
---|---|---|
committer | Robert Adams | 2012-09-27 22:02:08 -0700 |
commit | 74dea4cfd52be75b4dd6277260c3ada80b939fbb (patch) | |
tree | 5781a9b2cb58bf27cb58d6189c535b33ca4af439 /OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |
parent | BulletSim: remove the trailing spaces from lines to make git happier (diff) | |
download | opensim-SC_OLD-74dea4cfd52be75b4dd6277260c3ada80b939fbb.zip opensim-SC_OLD-74dea4cfd52be75b4dd6277260c3ada80b939fbb.tar.gz opensim-SC_OLD-74dea4cfd52be75b4dd6277260c3ada80b939fbb.tar.bz2 opensim-SC_OLD-74dea4cfd52be75b4dd6277260c3ada80b939fbb.tar.xz |
BulletSim: rename some constraint variables to be consistant with other name use.
Added callbacks for shape and body changes in GetBodyAndShape() so the linkset
constraints can be picked up and restored. A better design might be to have
a "prim shape changed" event. Think about that.
Added constraint types to general constraint class.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index 544c53d..1125d7e 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |||
@@ -42,12 +42,12 @@ public struct BulletSim | |||
42 | { | 42 | { |
43 | ptr = xx; | 43 | ptr = xx; |
44 | worldID = worldId; | 44 | worldID = worldId; |
45 | scene = bss; | 45 | physicsScene = bss; |
46 | } | 46 | } |
47 | public IntPtr ptr; | 47 | public IntPtr ptr; |
48 | public uint worldID; | 48 | public uint worldID; |
49 | // The scene is only in here so very low level routines have a handle to print debug/error messages | 49 | // The scene is only in here so very low level routines have a handle to print debug/error messages |
50 | public BSScene scene; | 50 | public BSScene physicsScene; |
51 | } | 51 | } |
52 | 52 | ||
53 | // An allocated Bullet btRigidBody | 53 | // An allocated Bullet btRigidBody |
@@ -120,14 +120,27 @@ public struct BulletShape | |||
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | // Constraint type values as defined by Bullet | ||
124 | public enum ConstraintType : int | ||
125 | { | ||
126 | POINT2POINT_CONSTRAINT_TYPE = 3, | ||
127 | HINGE_CONSTRAINT_TYPE, | ||
128 | CONETWIST_CONSTRAINT_TYPE, | ||
129 | D6_CONSTRAINT_TYPE, | ||
130 | SLIDER_CONSTRAINT_TYPE, | ||
131 | CONTACT_CONSTRAINT_TYPE, | ||
132 | D6_SPRING_CONSTRAINT_TYPE, | ||
133 | MAX_CONSTRAINT_TYPE | ||
134 | } | ||
135 | |||
123 | // An allocated Bullet btConstraint | 136 | // An allocated Bullet btConstraint |
124 | public struct BulletConstraint | 137 | public struct BulletConstraint |
125 | { | 138 | { |
126 | public BulletConstraint(IntPtr xx) | 139 | public BulletConstraint(IntPtr xx) |
127 | { | 140 | { |
128 | Ptr = xx; | 141 | ptr = xx; |
129 | } | 142 | } |
130 | public IntPtr Ptr; | 143 | public IntPtr ptr; |
131 | } | 144 | } |
132 | 145 | ||
133 | // An allocated HeightMapThing which holds various heightmap info. | 146 | // An allocated HeightMapThing which holds various heightmap info. |