Ejemplo n.º 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>();
		}
Ejemplo n.º 2
0
		protected virtual void OnCollisionEnd(PhysicsBody other)
		{
			if (CollisionEnd != null)
				CollisionEnd(other);
		}
Ejemplo n.º 3
0
		//PhysicsBody Collision begin and end
		protected virtual void OnCollisionBegin(PhysicsBody other)
		{
			if (CollisionBegin != null)
				CollisionBegin(other);
		}
Ejemplo n.º 4
0
		private static void UpdatePositionAndOrientation(Entity3D entity, PhysicsBody physicsBody)
		{
			entity.Position = physicsBody.Position;
			entity.Orientation = physicsBody.GetOrientation();
		}
Ejemplo n.º 5
0
		public abstract PhysicsJoint CreateJoint(JointType jointType, PhysicsBody bodyA,
			PhysicsBody bodyB, object[] args);
Ejemplo n.º 6
0
		protected abstract void RemoveBody(PhysicsBody body);
Ejemplo n.º 7
0
		protected void AddBody(PhysicsBody body)
		{
			bodies.Add(body);
		}
Ejemplo n.º 8
0
 private static void UpdatePositionAndOrientation(Entity3D entity, PhysicsBody physicsBody)
 {
     entity.Position    = physicsBody.Position;
     entity.Orientation = physicsBody.GetOrientation();
 }
Ejemplo n.º 9
0
			public PhysicsBodyOrientationIsBrokenMakeSureAllValuesAreSet(PhysicsBody physicsBody)
				: base(physicsBody.ToString()) {}