Beispiel #1
0
		protected PhysicsJoint(JointType jointType, PhysicsBody bodyA, PhysicsBody bodyB,
			object[] args)
		{
			JointType = jointType;
			BodyA = bodyA;
			BodyB = bodyB;
			//PhysicsJoint: 'args' presumably populate Properties
			Properties = new Dictionary<PropertyType, object>();
		}
Beispiel #2
0
		protected virtual void OnCollisionEnd(PhysicsBody other)
		{
			if (CollisionEnd != null)
				CollisionEnd(other);
		}
Beispiel #3
0
		//PhysicsBody Collision begin and end
		protected virtual void OnCollisionBegin(PhysicsBody other)
		{
			if (CollisionBegin != null)
				CollisionBegin(other);
		}
		private static void UpdatePositionAndOrientation(Entity3D entity, PhysicsBody physicsBody)
		{
			entity.Position = physicsBody.Position;
			entity.Orientation = physicsBody.GetOrientation();
		}
Beispiel #5
0
		public abstract PhysicsJoint CreateJoint(JointType jointType, PhysicsBody bodyA,
			PhysicsBody bodyB, object[] args);
Beispiel #6
0
		protected abstract void RemoveBody(PhysicsBody body);
Beispiel #7
0
		protected void AddBody(PhysicsBody body)
		{
			bodies.Add(body);
		}
 private static void UpdatePositionAndOrientation(Entity3D entity, PhysicsBody physicsBody)
 {
     entity.Position    = physicsBody.Position;
     entity.Orientation = physicsBody.GetOrientation();
 }
			public PhysicsBodyOrientationIsBrokenMakeSureAllValuesAreSet(PhysicsBody physicsBody)
				: base(physicsBody.ToString()) {}