edu.byu.phun.body
Class Leg

java.lang.Object
  extended by edu.byu.phun.PropertyContainer
      extended by edu.byu.phun.Obj3D
          extended by edu.byu.phun.GroupObj
              extended by edu.byu.phun.body.BodyPart
                  extended by edu.byu.phun.body.Leg

public class Leg
extends BodyPart

This is a Leg object that controls the knee flex and the foot.


Field Summary
 LowerLeg lowerLeg
           
 
Constructor Summary
Leg()
          Creates a new leg with the hip at the origin and the leg pointed down.
 
Method Summary
 double getFootFlex()
          Returns the current flex of the foot.
 double getKneeFlex()
          Return the flex of the knee.
 Color getPantsColor()
          Returns the color of the pants.
 Color getSkinColor()
          Returns the color of the skin.
 void setFootFlex(double degrees)
          This will flex the foot.
 void setKneeFlex(double degrees)
          Controls te flex of the knee joint.
 void setPantsColor(Color color)
          Sets the color of the pants.
 void setSkinColor(Color color)
          Sets the skin color.
 
Methods inherited from class edu.byu.phun.GroupObj
addPart, getPart, getPart, nParts, partNames, removePart, removePart, setColor, setPart
 
Methods inherited from class edu.byu.phun.Obj3D
getBounds, getColor, getLocation, getName, getRotX, getRotY, getRotZ, getScaleX, getScaleY, getScaleZ, getShininess, setColor, setLocation, setLocation, setName, setRotX, setRotY, setRotZ, setScale, setScale, setScaleX, setScaleY, setScaleZ, setShininess, toString
 
Methods inherited from class edu.byu.phun.PropertyContainer
getPropertyC, getPropertyD, getPropertyP, getPropertyS, propertyIsColor, propertyIsDouble, propertyIsPoint, propertyIsSettable, propertyIsString, propertyNames, setProperty, setProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lowerLeg

public LowerLeg lowerLeg
Constructor Detail

Leg

public Leg()
Creates a new leg with the hip at the origin and the leg pointed down.

Method Detail

setPantsColor

public void setPantsColor(Color color)
Sets the color of the pants. This is generally called from MaleBody rather than directly.

Parameters:
color - the new pants color.

getPantsColor

public Color getPantsColor()
Returns the color of the pants.

Returns:
pants color.

setSkinColor

public void setSkinColor(Color color)
Sets the skin color. This is generally called from MaleBody rather than directly.

Parameters:
color - new skin color.

getSkinColor

public Color getSkinColor()
Returns the color of the skin.

Returns:
the skin color.

setKneeFlex

public void setKneeFlex(double degrees)
Controls te flex of the knee joint.

Parameters:
degrees - knee flex in degrees. 0 keeps the leg straight. Positive flex will bend the knee normally. Negative flex looks very painful.

getKneeFlex

public double getKneeFlex()
Return the flex of the knee.

Returns:
the knee flex.
See Also:
setKneeFlex(double)

setFootFlex

public void setFootFlex(double degrees)
This will flex the foot.

Parameters:
degrees - degrees of foot flex. 0 degrees will hold the foot perpendicular to the shin. Positive will bring the toe up. Negative will point the toe down.

getFootFlex

public double getFootFlex()
Returns the current flex of the foot.

Returns:
the foot flex.
See Also:
setFootFlex(double)