diff options
author | Kitto Flora | 2009-12-22 00:20:04 -0500 |
---|---|---|
committer | Kitto Flora | 2009-12-22 00:20:04 -0500 |
commit | 0a29842caf5dbe711490b9b323ae922c418c6c30 (patch) | |
tree | 17f1403561f8bf1238dae53ff29f126b645b6793 /OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-0a29842caf5dbe711490b9b323ae922c418c6c30.zip opensim-SC_OLD-0a29842caf5dbe711490b9b323ae922c418c6c30.tar.gz opensim-SC_OLD-0a29842caf5dbe711490b9b323ae922c418c6c30.tar.bz2 opensim-SC_OLD-0a29842caf5dbe711490b9b323ae922c418c6c30.tar.xz |
Include ChOdePlugin
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs index 78b15be..39cdc0f 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEDynamics.cs | |||
@@ -23,19 +23,6 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | ||
27 | * Revised Aug, Sept 2009 by Kitto Flora. ODEDynamics.cs replaces | ||
28 | * ODEVehicleSettings.cs. It and ODEPrim.cs are re-organised: | ||
29 | * ODEPrim.cs contains methods dealing with Prim editing, Prim | ||
30 | * characteristics and Kinetic motion. | ||
31 | * ODEDynamics.cs contains methods dealing with Prim Physical motion | ||
32 | * (dynamics) and the associated settings. Old Linear and angular | ||
33 | * motors for dynamic motion have been replace with MoveLinear() | ||
34 | * and MoveAngular(); 'Physical' is used only to switch ODE dynamic | ||
35 | * simualtion on/off; VEHICAL_TYPE_NONE/VEHICAL_TYPE_<other> is to | ||
36 | * switch between 'VEHICLE' parameter use and general dynamics | ||
37 | * settings use. | ||
38 | * | ||
39 | */ | 26 | */ |
40 | 27 | ||
41 | /* Revised Aug, Sept 2009 by Kitto Flora. ODEDynamics.cs replaces | 28 | /* Revised Aug, Sept 2009 by Kitto Flora. ODEDynamics.cs replaces |
@@ -133,7 +120,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
133 | // private float m_VhoverEfficiency = 0f; | 120 | // private float m_VhoverEfficiency = 0f; |
134 | private float m_VhoverTimescale = 0f; | 121 | private float m_VhoverTimescale = 0f; |
135 | private float m_VhoverTargetHeight = -1.0f; // if <0 then no hover, else its the current target height | 122 | private float m_VhoverTargetHeight = -1.0f; // if <0 then no hover, else its the current target height |
136 | private float m_VehicleBuoyancy = 0f; // Set by VEHICLE_BUOYANCY, for a vehicle. | 123 | private float m_VehicleBuoyancy = 0f; //KF: m_VehicleBuoyancy is set by VEHICLE_BUOYANCY for a vehicle. |
137 | // Modifies gravity. Slider between -1 (double-gravity) and 1 (full anti-gravity) | 124 | // Modifies gravity. Slider between -1 (double-gravity) and 1 (full anti-gravity) |
138 | // KF: So far I have found no good method to combine a script-requested .Z velocity and gravity. | 125 | // KF: So far I have found no good method to combine a script-requested .Z velocity and gravity. |
139 | // Therefore only m_VehicleBuoyancy=1 (0g) will use the script-requested .Z velocity. | 126 | // Therefore only m_VehicleBuoyancy=1 (0g) will use the script-requested .Z velocity. |
@@ -492,7 +479,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
492 | Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); // rotq = rotation of object | 479 | Quaternion rotq = new Quaternion(rot.X, rot.Y, rot.Z, rot.W); // rotq = rotation of object |
493 | m_dir *= rotq; // apply obj rotation to velocity vector | 480 | m_dir *= rotq; // apply obj rotation to velocity vector |
494 | 481 | ||
495 | // add Gravity and Buoyancy | 482 | // add Gravity andBuoyancy |
496 | // KF: So far I have found no good method to combine a script-requested | 483 | // KF: So far I have found no good method to combine a script-requested |
497 | // .Z velocity and gravity. Therefore only 0g will used script-requested | 484 | // .Z velocity and gravity. Therefore only 0g will used script-requested |
498 | // .Z velocity. >0g (m_VehicleBuoyancy < 1) will used modified gravity only. | 485 | // .Z velocity. >0g (m_VehicleBuoyancy < 1) will used modified gravity only. |
@@ -574,7 +561,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
574 | private Vector3 m_angularFrictionTimescale = Vector3.Zero; // body angular velocity decay rate | 561 | private Vector3 m_angularFrictionTimescale = Vector3.Zero; // body angular velocity decay rate |
575 | private Vector3 m_lastAngularVelocity = Vector3.Zero; // what was last applied to body | 562 | private Vector3 m_lastAngularVelocity = Vector3.Zero; // what was last applied to body |
576 | */ | 563 | */ |
577 | //if(frcount == 0) Console.WriteLine("MoveAngular "); | ||
578 | 564 | ||
579 | // Get what the body is doing, this includes 'external' influences | 565 | // Get what the body is doing, this includes 'external' influences |
580 | d.Vector3 angularVelocity = d.BodyGetAngularVel(Body); | 566 | d.Vector3 angularVelocity = d.BodyGetAngularVel(Body); |
@@ -650,7 +636,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
650 | // Deflection section tba | 636 | // Deflection section tba |
651 | 637 | ||
652 | // Sum velocities | 638 | // Sum velocities |
653 | m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // tba: + bank + deflection | 639 | m_lastAngularVelocity = m_angularMotorVelocity + vertattr; // + bank + deflection |
654 | 640 | ||
655 | if (!m_lastAngularVelocity.ApproxEquals(Vector3.Zero, 0.01f)) | 641 | if (!m_lastAngularVelocity.ApproxEquals(Vector3.Zero, 0.01f)) |
656 | { | 642 | { |