From 11ed932263161d1dbea99d4a5699ba6d00894053 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Mar 2012 01:46:41 +0000 Subject: Tell physics about physics shape when creating. Added some virtual methods to get/set density,gravmod, frition,bounce and shape type ( not in use ). UbitOde now should do convex type on creation or everytime the mesh is changed ( as in change size, shape, etc ) --- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 7 +++++++ OpenSim/Region/Physics/Manager/PhysicsScene.cs | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'OpenSim/Region/Physics/Manager') diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index bd80fff..be67204 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -172,6 +172,8 @@ namespace OpenSim.Region.Physics.Manager public virtual bool Phantom { get; set; } + public virtual byte PhysicsShapeType { get; set; } + public abstract PrimitiveBaseShape Shape { set; } uint m_baseLocalID; @@ -252,6 +254,11 @@ namespace OpenSim.Region.Physics.Manager { } + public virtual float Density { get; set; } + public virtual float GravModifier { get; set; } + public virtual float Friction { get; set; } + public virtual float Bounce { get; set; } + /// /// Position of this actor. /// diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index eca6a0f..f2c0c28 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -137,6 +137,13 @@ namespace OpenSim.Region.Physics.Manager return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid); } + + public virtual PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, + Vector3 size, Quaternion rotation, bool isPhysical, bool isPhantom, byte shapetype, uint localid) + { + return AddPrimShape(primName, pbs, position, size, rotation, isPhysical, localid); + } + public virtual float TimeDilation { get { return 1.0f; } -- cgit v1.1