aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager/PhysicsScene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-12-26 12:58:02 +0000
committerTeravus Ovares2008-12-26 12:58:02 +0000
commitec2dc354b485491d7879686b4a78027971e3ed92 (patch)
tree3ea0771a55524ce1b9dec3c3c66f0dac24a006ef /OpenSim/Region/Physics/Manager/PhysicsScene.cs
parentPrevent exception in terrain module if just the word terrain is entered at th... (diff)
downloadopensim-SC_OLD-ec2dc354b485491d7879686b4a78027971e3ed92.zip
opensim-SC_OLD-ec2dc354b485491d7879686b4a78027971e3ed92.tar.gz
opensim-SC_OLD-ec2dc354b485491d7879686b4a78027971e3ed92.tar.bz2
opensim-SC_OLD-ec2dc354b485491d7879686b4a78027971e3ed92.tar.xz
* Applying Nlin's NINJA Joint patch. v2. Mantis# 2874
* Thanks nlin! * To try it out, set ninja joints active in the ODEPhysicsSettings and use the example at: * http://forge.opensimulator.org/gf/download/frsrelease/142/304/demo-playground.tgz. * Don't forget to change the .tgz to .oar and load it with load-oar.
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsScene.cs')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs64
1 files changed, 64 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index f104632..2cf4d5a 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -73,6 +73,67 @@ namespace OpenSim.Region.Physics.Manager
73 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, 73 public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position,
74 PhysicsVector size, Quaternion rotation, bool isPhysical); 74 PhysicsVector size, Quaternion rotation, bool isPhysical);
75 75
76 public virtual bool SupportsNINJAJoints
77 {
78 get { return false; }
79 }
80
81 public virtual PhysicsJoint RequestJointCreation(string objectNameInScene, PhysicsJointType jointType, PhysicsVector position,
82 Quaternion rotation, string parms, List<string> bodyNames, string trackedBodyName, Quaternion localRotation)
83 { return null; }
84
85 public virtual void RequestJointDeletion(string objectNameInScene)
86 { return; }
87
88 public virtual void RemoveAllJointsConnectedToActorThreadLocked(PhysicsActor actor)
89 { return; }
90
91 public virtual void DumpJointInfo()
92 { return; }
93
94 public event JointMoved OnJointMoved;
95
96 protected virtual void DoJointMoved(PhysicsJoint joint)
97 {
98 // We need this to allow subclasses (but not other classes) to invoke the event; C# does
99 // not allow subclasses to invoke the parent class event.
100 if (OnJointMoved != null)
101 {
102 OnJointMoved(joint);
103 }
104 }
105
106 public event JointDeactivated OnJointDeactivated;
107
108 protected virtual void DoJointDeactivated(PhysicsJoint joint)
109 {
110 // We need this to allow subclasses (but not other classes) to invoke the event; C# does
111 // not allow subclasses to invoke the parent class event.
112 if (OnJointDeactivated != null)
113 {
114 OnJointDeactivated(joint);
115 }
116 }
117
118 public event JointErrorMessage OnJointErrorMessage;
119
120 protected virtual void DoJointErrorMessage(PhysicsJoint joint, string message)
121 {
122 // We need this to allow subclasses (but not other classes) to invoke the event; C# does
123 // not allow subclasses to invoke the parent class event.
124 if (OnJointErrorMessage != null)
125 {
126 OnJointErrorMessage(joint, message);
127 }
128 }
129
130 public virtual PhysicsVector GetJointAnchor(PhysicsJoint joint)
131 { return null; }
132
133 public virtual PhysicsVector GetJointAxis(PhysicsJoint joint)
134 { return null; }
135
136
76 public abstract void AddPhysicsActorTaint(PhysicsActor prim); 137 public abstract void AddPhysicsActorTaint(PhysicsActor prim);
77 138
78 public abstract float Simulate(float timeStep); 139 public abstract float Simulate(float timeStep);
@@ -181,4 +242,7 @@ namespace OpenSim.Region.Physics.Manager
181 } 242 }
182 } 243 }
183 } 244 }
245 public delegate void JointMoved(PhysicsJoint joint);
246 public delegate void JointDeactivated(PhysicsJoint joint);
247 public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation"
184} 248}