InteractionSource
ElementArrow
, ElementBox
, ElementCircle
, ElementCone
, ElementCylinder
, ElementEllipsoid
, ElementImage
, ElementObject
, ElementPlane
, ElementPoints
, ElementPolygon
, ElementSegment
, ElementSphere
, ElementSpring
, ElementSurface
, ElementTessellation
, ElementTetrahedron
, ElementText
, ElementTrail
, Group
, Set
AbstractTile
, Element
, ElementArrow
, ElementBox
, ElementCircle
, ElementCone
, ElementCylinder
, ElementEllipsoid
, ElementImage
, ElementObject
, ElementPlane
, ElementPoints
, ElementPolygon
, ElementSegment
, ElementSphere
, ElementSpring
, ElementSurface
, ElementTessellation
, ElementTetrahedron
, ElementText
, ElementTrail
, Group
, Set
public interface Element extends InteractionSource
Title: Element
Description: A basic individual, interactive 3D element.
Modifier and Type | Interface | Description |
---|---|---|
static class |
Element.Loader |
A class to save and load Element data.
|
Modifier and Type | Field | Description |
---|---|---|
static int |
TARGET_POSITION |
The id for the target that allows to reposition the element.
|
static int |
TARGET_SIZE |
The id for the target that allows to resize the element.
|
Modifier and Type | Method | Description |
---|---|---|
DrawingPanel3D |
getDrawingPanel3D() |
Returns the DrawingPanel3D in which it (or its final ancestor group)
is displayed.
|
java.lang.String |
getName() |
Gets the name of the element
|
double |
getSizeX() |
Get the size along the X axis
|
double |
getSizeY() |
Get the size along the Y axis
|
double |
getSizeZ() |
Get the size along the Z axis
|
Style |
getStyle() |
Gets the style of the element
|
Transformation |
getTransformation() |
Returns a clone of the element transformation
|
double |
getX() |
Get the X coordinate of the element
|
double |
getY() |
Get the Y coordinate of the element
|
double |
getZ() |
Get the Z coordinate of the element
|
boolean |
isVisible() |
Whether the element is visible
|
void |
loadUnmutableObjects(XMLControl control) |
Loads unmutable objects of the Element, such as the style,
as well as perform any extra implementation-specific initialization.
|
void |
setName(java.lang.String name) |
Gives a name to the element.
|
void |
setSizeX(double sizeX) |
Set the size along the X axis
|
void |
setSizeXYZ(double[] size) |
Sets the size of the element.
|
void |
setSizeXYZ(double sizeX,
double sizeY,
double sizeZ) |
Set the size along the X, Y and Z axes
|
void |
setSizeY(double sizeY) |
Set the size along the Y axis
|
void |
setSizeZ(double sizeZ) |
Set the size along the Z axis
|
void |
setTransformation(Transformation transformation) |
Sets the internal transformation of the element, that is, the
transformation that converts the standard XYZ axes to the body's
internal reference axes.
|
void |
setVisible(boolean _visible) |
Sets the visibility of the element
|
void |
setX(double x) |
Set the X coordinate of the element
|
void |
setXYZ(double[] pos) |
Sets the coordinates of the element.
|
void |
setXYZ(double x,
double y,
double z) |
Set the X, Y, and Z coordinates of the element
|
void |
setY(double y) |
Set the Y coordinate of the element
|
void |
setZ(double z) |
Set the Z coordinate of the element
|
double[] |
toBodyFrame(double[] vector) |
This method converts a double[3] vector from the space's frame to
the body's frame.
|
double[] |
toSpaceFrame(double[] vector) |
This method transforms a double[3] vector from the body's frame to
the space's frame.
|
addInteractionListener, getInteractionTarget, removeInteractionListener
static final int TARGET_POSITION
static final int TARGET_SIZE
DrawingPanel3D getDrawingPanel3D()
void setName(java.lang.String name)
name
- Stringjava.lang.String getName()
void setX(double x)
x
- doubledouble getX()
void setY(double y)
y
- doubledouble getY()
void setZ(double z)
z
- doubledouble getZ()
void setXYZ(double x, double y, double z)
x
- doubley
- doublez
- doublevoid setXYZ(double[] pos)
pos
- double[]void setSizeX(double sizeX)
sizeX
- doubledouble getSizeX()
void setSizeY(double sizeY)
sizeY
- doubledouble getSizeY()
void setSizeZ(double sizeZ)
sizeZ
- doubledouble getSizeZ()
void setSizeXYZ(double sizeX, double sizeY, double sizeZ)
sizeX
- doublesizeY
- doublesizeZ
- doublevoid setSizeXYZ(double[] size)
size
- double[]void setVisible(boolean _visible)
_visible
- booleanboolean isVisible()
void setTransformation(Transformation transformation)
transformation
- the new transformationTransformation
Transformation getTransformation()
double[] toSpaceFrame(double[] vector)
vector
- double[] The original coordinates in the body framedouble[] toBodyFrame(double[] vector) throws java.lang.UnsupportedOperationException
vector
- double[] The original coordinates in the spacejava.lang.UnsupportedOperationException
void loadUnmutableObjects(XMLControl control)
control
- XMLControl