edu.byu.phun.body
Class Head

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

public class Head
extends BodyPart

This creates a human head with two eyes, two eyebrows, a nose a upperLip and hair. The head is spherical, centered at the origin and of radius 1.0. The skin color can be changed as well as the hair color.


Field Summary
 Eye leftEye
          This is the left eye as one is looking out from the face.
 Eye rightEye
          This is the right eye as one is looking out from the face.
 
Constructor Summary
Head()
          Create a new Head object.
 
Method Summary
 Color getEyeColor()
          Returns the color of the eyes.
 Color getHairColor()
          The hair color.
 Color getSkinColor()
          Returns the current skin color.
 void setEyeColor(double red, double green, double blue)
          Sets the eye color for both eyes.
 void setHairColor(Color color)
          Changes the color of the hair.
 void setHairColor(double red, double green, double blue)
          Changes the color of the hair.
 void setSkinColor(Color color)
          Sets the skin color of the face.
 void setSkinColor(double red, double green, double blue)
          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

leftEye

public Eye leftEye
This is the left eye as one is looking out from the face. Using this object the eye can be turned.


rightEye

public Eye rightEye
This is the right eye as one is looking out from the face. Using this object, the eye can be turned.

Constructor Detail

Head

public Head()
Create a new Head object.

Method Detail

setSkinColor

public void setSkinColor(double red,
                         double green,
                         double blue)
Sets the skin color.

Parameters:
red -
green -
blue -

setSkinColor

public void setSkinColor(Color color)
Sets the skin color of the face.

Parameters:
color - the new color

getSkinColor

public Color getSkinColor()
Returns the current skin color.

Returns:
the skin color
See Also:
setSkinColor(Color)

setHairColor

public void setHairColor(double red,
                         double green,
                         double blue)
Changes the color of the hair.

Parameters:
red - the red component.
green - the green component.
blue - the blue component.

setHairColor

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

Parameters:
color - the hair color.

getHairColor

public Color getHairColor()
The hair color.

Returns:
the hair color

setEyeColor

public void setEyeColor(double red,
                        double green,
                        double blue)
Sets the eye color for both eyes.

Parameters:
red -
green -
blue -

getEyeColor

public Color getEyeColor()
Returns the color of the eyes.

Returns:
eye color.