|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.math3D.Polygon3D
com.brackeen.javagamebook.math3D.TexturedPolygon3D
The TexturedPolygon3D class is a Polygon with a texture.
Constructor Summary | |
TexturedPolygon3D()
|
|
TexturedPolygon3D(Vector3D[] vertices)
|
|
TexturedPolygon3D(Vector3D v0,
Vector3D v1,
Vector3D v2)
|
|
TexturedPolygon3D(Vector3D v0,
Vector3D v1,
Vector3D v2,
Vector3D v3)
|
Method Summary | |
void |
add(Vector3D u)
|
void |
addRotation(Transform3D xform)
|
Rectangle3D |
calcBoundingRectangle()
Calculates the bounding rectangle for this polygon that is aligned with the texture bounds. |
Texture |
getTexture()
Gets this polygon's texture. |
Rectangle3D |
getTextureBounds()
Gets this polygon's texture bounds. |
void |
setTexture(Texture texture)
Sets this polygon's texture. |
void |
setTexture(Texture texture,
Rectangle3D bounds)
Sets this polygon's texture and texture bounds. |
void |
setTo(Polygon3D poly)
Sets this polygon to the same vertices as the specfied polygon. |
void |
subtract(Vector3D u)
|
void |
subtractRotation(Transform3D xform)
|
Methods inherited from class com.brackeen.javagamebook.math3D.Polygon3D |
add, calcNormal, clip, getNormal, getNumVertices, getVertex, insertVertex, isFacing, project, setNormal, subtract |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TexturedPolygon3D()
public TexturedPolygon3D(Vector3D v0, Vector3D v1, Vector3D v2)
public TexturedPolygon3D(Vector3D v0, Vector3D v1, Vector3D v2, Vector3D v3)
public TexturedPolygon3D(Vector3D[] vertices)
Method Detail |
public void setTo(Polygon3D poly)
Polygon3D
setTo
in class Polygon3D
public Texture getTexture()
public Rectangle3D getTextureBounds()
public void setTexture(Texture texture)
public void setTexture(Texture texture, Rectangle3D bounds)
public void add(Vector3D u)
add
in interface Transformable
add
in class Polygon3D
public void subtract(Vector3D u)
subtract
in interface Transformable
subtract
in class Polygon3D
public void addRotation(Transform3D xform)
addRotation
in interface Transformable
addRotation
in class Polygon3D
public void subtractRotation(Transform3D xform)
subtractRotation
in interface Transformable
subtractRotation
in class Polygon3D
public Rectangle3D calcBoundingRectangle()
calcBoundingRectangle
in class Polygon3D
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |