diff options
author | BlueWall | 2012-12-12 23:34:20 -0500 |
---|---|---|
committer | BlueWall | 2012-12-12 23:34:20 -0500 |
commit | 7a87c35f94a846e9a2b74d2347c2be5ba0511a38 (patch) | |
tree | ecb370ecb60a256a0b40787d76932a0d86b78ec4 /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |
parent | Move setting to correct locations in ini (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-7a87c35f94a846e9a2b74d2347c2be5ba0511a38.zip opensim-SC_OLD-7a87c35f94a846e9a2b74d2347c2be5ba0511a38.tar.gz opensim-SC_OLD-7a87c35f94a846e9a2b74d2347c2be5ba0511a38.tar.bz2 opensim-SC_OLD-7a87c35f94a846e9a2b74d2347c2be5ba0511a38.tar.xz |
Merge branch 'master' of /home/opensim/var/repo/opensim
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 35d22c0..19c29cc 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -45,7 +45,6 @@ public sealed class BSPrim : BSPhysObject | |||
45 | private static readonly string LogHeader = "[BULLETS PRIM]"; | 45 | private static readonly string LogHeader = "[BULLETS PRIM]"; |
46 | 46 | ||
47 | // _size is what the user passed. Scale is what we pass to the physics engine with the mesh. | 47 | // _size is what the user passed. Scale is what we pass to the physics engine with the mesh. |
48 | // Often Scale is unity because the meshmerizer will apply _size when creating the mesh. | ||
49 | private OMV.Vector3 _size; // the multiplier for each mesh dimension as passed by the user | 48 | private OMV.Vector3 _size; // the multiplier for each mesh dimension as passed by the user |
50 | 49 | ||
51 | private bool _grabbed; | 50 | private bool _grabbed; |
@@ -93,7 +92,7 @@ public sealed class BSPrim : BSPhysObject | |||
93 | _physicsActorType = (int)ActorTypes.Prim; | 92 | _physicsActorType = (int)ActorTypes.Prim; |
94 | _position = pos; | 93 | _position = pos; |
95 | _size = size; | 94 | _size = size; |
96 | Scale = size; // the scale will be set by CreateGeom depending on object type | 95 | Scale = size; // prims are the size the user wants them to be (different for BSCharactes). |
97 | _orientation = rotation; | 96 | _orientation = rotation; |
98 | _buoyancy = 1f; | 97 | _buoyancy = 1f; |
99 | _velocity = OMV.Vector3.Zero; | 98 | _velocity = OMV.Vector3.Zero; |
@@ -159,12 +158,10 @@ public sealed class BSPrim : BSPhysObject | |||
159 | // We presume the scale and size are the same. If scale must be changed for | 158 | // We presume the scale and size are the same. If scale must be changed for |
160 | // the physical shape, that is done when the geometry is built. | 159 | // the physical shape, that is done when the geometry is built. |
161 | _size = value; | 160 | _size = value; |
161 | Scale = _size; | ||
162 | ForceBodyShapeRebuild(false); | 162 | ForceBodyShapeRebuild(false); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | // Scale is what we set in the physics engine. It is different than 'size' in that | ||
166 | // 'size' can be encorporated into the mesh. In that case, the scale is <1,1,1>. | ||
167 | public override OMV.Vector3 Scale { get; set; } | ||
168 | 165 | ||
169 | public override PrimitiveBaseShape Shape { | 166 | public override PrimitiveBaseShape Shape { |
170 | set { | 167 | set { |
@@ -1369,7 +1366,6 @@ public sealed class BSPrim : BSPhysObject | |||
1369 | // Create the correct physical representation for this type of object. | 1366 | // Create the correct physical representation for this type of object. |
1370 | // Updates PhysBody and PhysShape with the new information. | 1367 | // Updates PhysBody and PhysShape with the new information. |
1371 | // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary. | 1368 | // Ignore 'forceRebuild'. This routine makes the right choices and changes of necessary. |
1372 | // Returns 'true' if either the body or the shape was changed. | ||
1373 | PhysicsScene.Shapes.GetBodyAndShape(false, PhysicsScene.World, this, null, delegate(BulletBody dBody) | 1369 | PhysicsScene.Shapes.GetBodyAndShape(false, PhysicsScene.World, this, null, delegate(BulletBody dBody) |
1374 | { | 1370 | { |
1375 | // Called if the current prim body is about to be destroyed. | 1371 | // Called if the current prim body is about to be destroyed. |