Element
, ElementCylinder
, InteractionSource
public class ElementCylinder extends AbstractTile implements ElementCylinder
Title: ElementCylinder
Description: Painter's algorithm implementation of a Cylinder
Modifier and Type | Class | Description |
---|---|---|
protected static class |
ElementCylinder.Loader |
Modifier and Type | Field | Description |
---|---|---|
protected static double |
TO_RADIANS |
corners, numberOfTiles
TARGET_POSITION, TARGET_SIZE
targetPosition, targetSize
Constructor | Description |
---|---|
ElementCylinder() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
computeCorners() |
This will be used by subclasses whenever there is a need to recompute
the actual values of the corners before drawing.
|
static XML.ObjectLoader |
getLoader() |
Returns an XML.ObjectLoader to save and load object data.
|
int |
getMaximumAngle() |
Gets the maximum angle used to build the top and faces sides of the cylinder.
|
int |
getMinimumAngle() |
Gets the minimum angle used to build the top and bottom faces of the cylinder.
|
boolean |
isClosedBottom() |
Whether the element is closed at its bottom.
|
boolean |
isClosedLeft() |
Whether the element is closed at its left side.
|
boolean |
isClosedRight() |
Whether the element is closed at its right side.
|
boolean |
isClosedTop() |
Whether the element is closed at its top.
|
void |
setClosedBottom(boolean close) |
Whether the element should be closed at its bottom.
|
void |
setClosedLeft(boolean close) |
Whether an incomplete element should be closed at its left side.
|
void |
setClosedRight(boolean close) |
Whether an incomplete element should be closed at its right side.
|
void |
setClosedTop(boolean close) |
Whether the element should be closed at its top.
|
void |
setMaximumAngle(int angle) |
Sets the maximum angle to build the top and bottom faces of the cylinder.
|
void |
setMinimumAngle(int angle) |
Sets the minimum angle to build the top and bottom faces of the cylinder.
|
getTargetHit, projectPoints, setColorBelowWhenEqual, setColorOriginAndDirection, setColorRegions, setCorners, setDrawQuickInterior
getDrawingPanel3D, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isVisible, loadUnmutableObjects, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
addInteractionListener, getAxesMode, getDrawingPanel3D, getHotSpotBodyCoordinates, getInteractionTarget, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isReallyVisible, isVisible, loadUnmutableObjects, removeInteractionListener, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
addInteractionListener, getInteractionTarget, removeInteractionListener
protected static final double TO_RADIANS
public void setClosedBottom(boolean close)
ElementCylinder
setClosedBottom
in interface ElementCylinder
public boolean isClosedBottom()
ElementCylinder
isClosedBottom
in interface ElementCylinder
public void setClosedTop(boolean close)
ElementCylinder
setClosedTop
in interface ElementCylinder
public boolean isClosedTop()
ElementCylinder
isClosedTop
in interface ElementCylinder
public void setClosedLeft(boolean close)
ElementCylinder
setClosedLeft
in interface ElementCylinder
public boolean isClosedLeft()
ElementCylinder
isClosedLeft
in interface ElementCylinder
public void setClosedRight(boolean close)
ElementCylinder
setClosedRight
in interface ElementCylinder
public boolean isClosedRight()
ElementCylinder
isClosedRight
in interface ElementCylinder
public void setMinimumAngle(int angle)
ElementCylinder
setMinimumAngle
in interface ElementCylinder
angle
- the minimum angle (in degrees)public int getMinimumAngle()
ElementCylinder
getMinimumAngle
in interface ElementCylinder
public void setMaximumAngle(int angle)
ElementCylinder
setMaximumAngle
in interface ElementCylinder
angle
- the maximum angle (in degrees)public int getMaximumAngle()
ElementCylinder
getMaximumAngle
in interface ElementCylinder
protected void computeCorners()
AbstractTile
computeCorners
in class AbstractTile
public static XML.ObjectLoader getLoader()