edu.byu.phun.body
Class MaleBody

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.MaleBody

public class MaleBody
extends BodyPart

This creates a male body standing at the origin and about 6 units high. The body is facing the positive Z axis with shoulders parallel to the X axis.


Field Summary
 Head head
          This provides access to the head.
 Arm leftArm
          This provides access to the controls of the left arm with the exception of shoulder movement.
 Leg leftLeg
          This provides access to the controls of the left leg with the exception of hip movement.
 Arm rightArm
          This provides access to the controls of the right arm with the exception of shoulder movement.
 Leg rightLeg
          This provides access to the controls of the right leg with the exception of hip movement.
 
Constructor Summary
MaleBody()
           
 
Method Summary
 Color getEyeColor()
          Returns the current eye color
 Color getHairColor()
          Returns the hair color.
 double getHeadLeftRight()
          Returns the current left right turn of the head.
 double getHeadNod()
          Returns the current nod of the head.
 double getLeftArmFrontRise()
          Return the left arm's front rise angle.
 double getLeftArmSideRise()
          Returns the left arm's raise angle.
 double getLeftLegFrontRise()
          Returns the left leg's front rise angle
 double getLeftLegSideRise()
          Returns the left leg's side rise.
 Color getPantsColor()
          Returns the color of the pants.
 double getRightArmFrontRise()
          Return the front rise of the right arm.
 double getRightArmSideRise()
          Returns the angle of arm raise.
 double getRightLegFrontRise()
          Return sthe right leg's front rise angle
 double getRightLegSideRise()
          Returns the amount of side rise for the right leg.
 Color getShirtColor()
          Returns the color of the shirt.
 Color getSkinColor()
          Returns the skin color.
 void setEyeColor(Color color)
          Sets the color of the eyes.
 void setHairColor(Color color)
          Sets the color of the hair.
 void setHeadLeftRight(double degrees)
          Turns the head to the left and right.
 void setHeadNod(double degrees)
          This will nod the head.
 void setLeftArmFrontRise(double degrees)
          This will raise the left arm to the front or back of the body.
 void setLeftArmSideRise(double degrees)
          This will raise the left arm at the sholder.
 void setLeftLegFrontRise(double degrees)
          This will rotate the left leg about the hip so that the leg moves forward.
 void setLeftLegSideRise(double degrees)
          This will rotate the left leg about the hip so that the leg moves away from the body to the side.
 void setPantsColor(Color color)
          Sets the color of the pants.
 void setRightArmFrontRise(double degrees)
          This will raise the right arm to the front or back of the body.
 void setRightArmSideRise(double degrees)
          This will raise the right arm at the sholder.
 void setRightLegFrontRise(double degrees)
          This will rotate the right leg about the hip so that the leg moves forward.
 void setRightLegSideRise(double degrees)
          This will rotate the right leg about the hip so that the leg moves away from the body to the side.
 void setShirtColor(Color color)
          This will set the shirt color on the torso and arms.
 void setSkinColor(Color color)
          This will set the skin color of all parts of the body.
 
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

head

public Head head
This provides access to the head.


leftArm

public Arm leftArm
This provides access to the controls of the left arm with the exception of shoulder movement.


rightArm

public Arm rightArm
This provides access to the controls of the right arm with the exception of shoulder movement.


rightLeg

public Leg rightLeg
This provides access to the controls of the right leg with the exception of hip movement.


leftLeg

public Leg leftLeg
This provides access to the controls of the left leg with the exception of hip movement.

Constructor Detail

MaleBody

public MaleBody()
Method Detail

setSkinColor

public void setSkinColor(Color color)
This will set the skin color of all parts of the body.

Parameters:
color - the new skin color.

getSkinColor

public Color getSkinColor()
Returns the skin color.

Returns:
the skin color.

setShirtColor

public void setShirtColor(Color color)
This will set the shirt color on the torso and arms.

Parameters:
color - the new shirt color.

getShirtColor

public Color getShirtColor()
Returns the color of the shirt.

Returns:
the shirt color.

setHeadNod

public void setHeadNod(double degrees)
This will nod the head. Positive will lift the head up. Negative will lower the head.

Parameters:
degrees - number of degrees to node. Recommend between -20 and 45.

getHeadNod

public double getHeadNod()
Returns the current nod of the head.

Returns:
the head nod.
See Also:
setHeadNod(double)

setHeadLeftRight

public void setHeadLeftRight(double degrees)
Turns the head to the left and right.

Parameters:
degrees - degrees of turn. Positive angles are to the left.

getHeadLeftRight

public double getHeadLeftRight()
Returns the current left right turn of the head.

Returns:
the head turn angle in degrees
See Also:
setHeadLeftRight(double)

setRightArmSideRise

public void setRightArmSideRise(double degrees)
This will raise the right arm at the sholder. Positive angles raise the arm away from the body. Negative angles bring the arm into the body. Zero is straight at the sides of the body.

Parameters:
degrees - the degrees to raise the arm.

getRightArmSideRise

public double getRightArmSideRise()
Returns the angle of arm raise.

Returns:
the arm raise in degrees.
See Also:
setRightArmSideRise(double)

setLeftArmSideRise

public void setLeftArmSideRise(double degrees)
This will raise the left arm at the sholder. Positive angles raise the arm away from the body. Negative angles bring the arm into the body. Zero is straight at the sides of the body.

Parameters:
degrees - the degrees to raise the arm.

getLeftArmSideRise

public double getLeftArmSideRise()
Returns the left arm's raise angle.

Returns:
the raise angle in degrees
See Also:
setLeftArmSideRise(double)

setRightArmFrontRise

public void setRightArmFrontRise(double degrees)
This will raise the right arm to the front or back of the body. Positive angles will raise the arm forward and negative angles will pull the arm backward.

Parameters:
degrees - the rise of the arm.

getRightArmFrontRise

public double getRightArmFrontRise()
Return the front rise of the right arm.

Returns:
the degrees of rise.
See Also:
setRightArmFrontRise(double)

setLeftArmFrontRise

public void setLeftArmFrontRise(double degrees)
This will raise the left arm to the front or back of the body. Positive angles will raise the arm forward and negative angles will pull the arm backward.

Parameters:
degrees - the rise of the arm.

getLeftArmFrontRise

public double getLeftArmFrontRise()
Return the left arm's front rise angle.

Returns:
front rise angle in degrees
See Also:
setLeftArmFrontRise(double)

setRightLegSideRise

public void setRightLegSideRise(double degrees)
This will rotate the right leg about the hip so that the leg moves away from the body to the side. Zero holds the leg straight down. Positive angles move the leg away from the body. Negative angles cross over the body.

Parameters:
degrees - the side rise angle.

getRightLegSideRise

public double getRightLegSideRise()
Returns the amount of side rise for the right leg.

Returns:
side rise angle in degress.
See Also:
setRightLegSideRise(double)

setLeftLegSideRise

public void setLeftLegSideRise(double degrees)
This will rotate the left leg about the hip so that the leg moves away from the body to the side. Zero holds the leg straight down. Positive angles move the leg away from the body. Negative angles cross over the body.

Parameters:
degrees - the side rise angle.

getLeftLegSideRise

public double getLeftLegSideRise()
Returns the left leg's side rise.

Returns:
the side rise in degrees.
See Also:
setLeftLegSideRise(double)

setRightLegFrontRise

public void setRightLegFrontRise(double degrees)
This will rotate the right leg about the hip so that the leg moves forward. Zero holds the leg straight down. Positive angles bring the leg up forward and negative angles move the leg backward.

Parameters:
degrees - the amount of front rise.

getRightLegFrontRise

public double getRightLegFrontRise()
Return sthe right leg's front rise angle

Returns:
the front rise in degrees.
See Also:
setRightLegFrontRise(double)

setLeftLegFrontRise

public void setLeftLegFrontRise(double degrees)
This will rotate the left leg about the hip so that the leg moves forward. Zero holds the leg straight down. Positive angles bring the leg up forward and negative angles move the leg backward.

Parameters:
degrees - the amount of front rise.

getLeftLegFrontRise

public double getLeftLegFrontRise()
Returns the left leg's front rise angle

Returns:
front rise in degrees.
See Also:
setLeftLegFrontRise(double)

setEyeColor

public void setEyeColor(Color color)
Sets the color of the eyes.

Parameters:
color - new eye color.

getEyeColor

public Color getEyeColor()
Returns the current eye color

Returns:
the color of the eyes.

setHairColor

public void setHairColor(Color color)
Sets the color of the hair.

Parameters:
color - the new hair color.

getHairColor

public Color getHairColor()
Returns the hair color.

Returns:
the hair color.

setPantsColor

public void setPantsColor(Color color)
Sets the color of the pants.

Parameters:
color - new pants color.

getPantsColor

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

Returns:
the pants color.