|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IShape
Defines methods required by 3D shapes.
Method Summary | |
---|---|
void |
add(IShape shape)
Add the given shape as a child of this. |
void |
clear()
Clear all child shapes. |
double |
computeNormalZComponent(int i1,
int i2,
int i3)
Compute the normal z component of the plane define by the points with the given indices in screen coordinates. |
void |
computeScreenPoints(Quaternion q,
Vector v,
double magnify,
int offsetX,
int offsetY,
double d)
Compute the points of this shape in screen coordinates. |
boolean |
contains(Point point)
Return true if the given point is within this shape. |
void |
drawOn(Graphics g,
double magnify)
Draw this shape on the given graphics with the given magnification. |
Rectangle |
getBounds()
Return the bounding box of the screen coordinates. |
ShapeGroup |
getChildren()
Return the child shapes. |
Color |
getColor()
Return the color of this shape. |
double |
getDepth()
|
Vector |
getDimensions()
Return the dimensions in world coordinates. |
double |
getHeight()
|
double |
getMinDimension()
Return the minimum dimension. |
String |
getName()
|
Vector |
getScreenCenter()
Return this shape's center in screen coordinates. |
String |
getTextureFilepath()
Return the texture filepath. |
double |
getWidth()
|
boolean |
isLightSource()
|
boolean |
isTextureFilepathSet()
Return true if a texture filepath is set. |
boolean |
isVisible()
Return true if this is visible. |
boolean |
isWireframe()
Return true if this is wireframe. |
void |
remove(IShape shape)
Remove the given child shape. |
void |
setColor(Color color)
Set the color. |
void |
setLightSource(boolean isLightSource)
|
void |
setName(String name)
|
void |
setTextureFilepath(String textureFilepath)
Set the texture filepath. |
void |
setVisible(boolean isVisible)
Set the visibility flag. |
void |
setWireframe(boolean isWireframe)
Set the wireframe flag. |
String |
toString()
Return a string representation of this object. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface org.vizzini.math.IStateful |
---|
getAbsoluteState, getState, getStatefulParent, setStatefulParent |
Method Detail |
---|
void add(IShape shape)
shape
- The new child shape.void clear()
double computeNormalZComponent(int i1, int i2, int i3)
void computeScreenPoints(Quaternion q, Vector v, double magnify, int offsetX, int offsetY, double d)
q
- Rotation of the parent to world coordinates.v
- The parent position in world coordinates..magnify
- The magnification.offsetX
- The offset X coordinate.offsetY
- The offset Y coordinate.d
- Perspective constant.boolean contains(Point point)
void drawOn(Graphics g, double magnify)
g
- The graphics.magnify
- The magnification.Rectangle getBounds()
ShapeGroup getChildren()
Color getColor()
double getDepth()
Vector getDimensions()
double getHeight()
double getMinDimension()
String getName()
Vector getScreenCenter()
String getTextureFilepath()
double getWidth()
boolean isLightSource()
boolean isTextureFilepathSet()
boolean isVisible()
boolean isWireframe()
void remove(IShape shape)
void setColor(Color color)
void setLightSource(boolean isLightSource)
isLightSource
- the isLightSource to setvoid setName(String name)
name
- the name to setvoid setTextureFilepath(String textureFilepath)
textureFilepath
- Texture filepath.void setVisible(boolean isVisible)
void setWireframe(boolean isWireframe)
String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |