Class FGearJoint

  extended by fisica.FDrawable
      extended by fisica.FJoint
          extended by fisica.FGearJoint

public class FGearJoint
extends FJoint

Represents a gear joint between joints that transfers the movement of one joint to the other. This type of joint can only be used on joints of types FRevoluteJoint and FPrismaticJoint.

Constructor Summary
FGearJoint(FJoint joint1, FJoint joint2)
          Construct a gear joint between two joints.
Method Summary
 void draw(processing.core.PGraphics applet)
          This method is called when calling world.draw().
 void setRatio(float ratio)
          Sets the ratio of movement transfer from one joint to the other of the gear.
Methods inherited from class fisica.FJoint
addToWorld, getBody1, getBody2, getBox2dJoint, getReactionForceX, getReactionForceY, getReactionTorque, removeFromWorld, setCollideConnected
Methods inherited from class fisica.FDrawable
attachImage, dettachImage, draw, drawDebug, drawDebug, getFillColor, getImageAlpha, isDrawable, setDrawable, setFill, setFill, setFill, setFill, setFillColor, setImageAlpha, setNoFill, setNoStroke, setStroke, setStroke, setStroke, setStroke, setStrokeColor, setStrokeWeight
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FGearJoint(FJoint joint1,
                  FJoint joint2)
Construct a gear joint between two joints.

joint1 - first joint of the gear
joint2 - second joint of the gear
Method Detail


public void setRatio(float ratio)
Sets the ratio of movement transfer from one joint to the other of the gear.

ratio - the ratio of movement that is transfered between the first and the second joints of the gear


public void draw(processing.core.PGraphics applet)
Description copied from class: FDrawable
This method is called when calling world.draw(). This method may be overriden to allow custom drawing of the object.

draw in class FDrawable
applet - the graphics onto which the object must be drawn.

processing library fisica by Ricard Marxer. (c) 2009-2013