예제 #1
0
		private void Draw(cpDampedRotarySpring constraint)
		{
			//Not used
		}
예제 #2
0
 private void Draw(cpDampedRotarySpring constraint)
 {
     //Not used
 }
예제 #3
0
 public float defaultSpringTorque(cpDampedRotarySpring spring, float relativeAngle)
 {
     return((relativeAngle - spring.restAngle) * spring.stiffness);
 }
예제 #4
0
		protected bool Init(CCPhysicsBody a, CCPhysicsBody b, float stiffness, float damping)
		{
			if (!base.Init(a, b))
				return false;

			cpConstraint joint = new cpDampedRotarySpring(GetBodyInfo(a).Body,
												   GetBodyInfo(b).Body,
													_bodyB.GetRotation() - _bodyA.GetRotation(),
													stiffness,
													damping);

			if (joint == null)
				return false;

			_info.Add(joint);


			return true;
		}
예제 #5
0
 public float defaultSpringTorque(cpDampedRotarySpring spring, float relativeAngle)
 {
     return (relativeAngle - spring.restAngle) * spring.stiffness;
 }