|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.byu.phun.PropertyContainer
edu.byu.phun.Obj3D
public class Obj3D
This is a super class of all 3D objects that can
be placed in the scene of a Win3D
or as a part in a GroupObj.
This class defines all of the operations that can be performed on a 3D object including:
| Constructor Summary | |
|---|---|
Obj3D()
|
|
| Method Summary | |
|---|---|
BoundingBox |
getBounds()
Returns a bounding box for this object. |
Color |
getColor()
This returns the color of the object. |
Point3d |
getLocation()
This will return the location of the origin of the object. |
java.lang.String |
getName()
Returns the name associated with this object. |
double |
getRotX()
Returns the rotation angle about X in degrees. |
double |
getRotY()
Returns the rotation angle about Y in degrees. |
double |
getRotZ()
Returns the rotation angle about Z in degrees. |
double |
getScaleX()
Returns the scale factor for X. |
double |
getScaleY()
Returns the scale factor for Y. |
double |
getScaleZ()
Returns the scale factor for Z. |
double |
getShininess()
This will return the shininess of the object. |
void |
setColor(Color newColor)
Changes the color of the object. |
void |
setColor(double red,
double green,
double blue)
This sets the color of the object. |
void |
setLocation(double x,
double y,
double z)
This will change the location of the object's origin. |
void |
setLocation(Point3d newLoc)
This will set the location of the object to a new position. |
void |
setName(java.lang.String newName)
Changes the name associated with this object. |
void |
setRotX(double xDegrees)
Sets the counter-clockwise rotation about X |
void |
setRotY(double yDegrees)
Sets the counter-clockwise rotation about Y |
void |
setRotZ(double zDegrees)
Sets the counter-clockwise rotation about Z |
void |
setScale(double newScale)
This will uniformly scale X, Y and Z so that Y will have the newScale. |
void |
setScale(double scaleX,
double scaleY,
double scaleZ)
This will set the scale factors for the object. |
void |
setScaleX(double scaleX)
This will change the X scale without changing other scales. |
void |
setScaleY(double scaleY)
This will change the height of the object in Y by scaling it using scaleY. |
void |
setScaleZ(double scaleZ)
This will change the depth of the object in Z by scaling it. |
void |
setShininess(double shininess)
This will set the shininess of the object. |
java.lang.String |
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 |
| Constructor Detail |
|---|
public Obj3D()
| Method Detail |
|---|
public void setLocation(Point3d newLoc)
newLoc - the new location for the origin of the object.
public void setLocation(double x,
double y,
double z)
x - the X coordinatey - the Y coordinatez - the Z coordinatepublic Point3d getLocation()
public void setScale(double scaleX,
double scaleY,
double scaleZ)
scaleX - the new scale factor for X.scaleY - the new scale factor for Y.scaleZ - the new new scale factor for Z.public void setScale(double newScale)
newScale - the new scale factor for all dimensions.public void setScaleX(double scaleX)
scaleX - the scale factor for X.public double getScaleX()
public void setScaleY(double scaleY)
scaleY - the new scale factor for Y.public double getScaleY()
public void setScaleZ(double scaleZ)
scaleZ - the new scale factor for Z.public double getScaleZ()
public void setRotX(double xDegrees)
xDegrees - counter-clockwise rotation about X in degrees.public void setRotY(double yDegrees)
yDegrees - counter-clockwise rotation about Y in degrees.public void setRotZ(double zDegrees)
zDegrees - counter-clockwise rotation about Z in degrees.public double getRotX()
public double getRotY()
public double getRotZ()
public Color getColor()
public void setColor(double red,
double green,
double blue)
Examples.
red - the red componentgreen - the green componentblue - the blue componentpublic void setColor(Color newColor)
newColor - the new colorsetColor(double, double, double)public double getShininess()
public void setShininess(double shininess)
shininess - the shininess of the object.public java.lang.String getName()
setName(String)public void setName(java.lang.String newName)
newName - the new name.public BoundingBox getBounds()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||