|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Title: Element
Description: A basic individual, interactive 3D element.
| Nested Class Summary | |
static class |
Element.Loader
A class to save and load Element data. |
| Field Summary | |
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. |
| Method Summary | |
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. |
| Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource |
addInteractionListener, getInteractionTarget, removeInteractionListener |
| Field Detail |
public static final int TARGET_POSITION
public static final int TARGET_SIZE
| Method Detail |
public void setName(java.lang.String name)
name - Stringpublic java.lang.String getName()
public void setX(double x)
x - doublepublic double getX()
public void setY(double y)
y - doublepublic double getY()
public void setZ(double z)
z - doublepublic double getZ()
public void setXYZ(double x,
double y,
double z)
x - doubley - doublez - doublepublic void setXYZ(double[] pos)
pos - double[]public void setSizeX(double sizeX)
sizeX - doublepublic double getSizeX()
public void setSizeY(double sizeY)
sizeY - doublepublic double getSizeY()
public void setSizeZ(double sizeZ)
sizeZ - doublepublic double getSizeZ()
public void setSizeXYZ(double sizeX,
double sizeY,
double sizeZ)
sizeX - doublesizeY - doublesizeZ - doublepublic void setSizeXYZ(double[] size)
size - double[]public void setVisible(boolean _visible)
_visible - booleanpublic boolean isVisible()
public Style getStyle()
Stylepublic void setTransformation(Transformation transformation)
transformation - the new transformationTransformationpublic Transformation getTransformation()
public double[] toSpaceFrame(double[] vector)
vector - double[] The original coordinates in the body frame
public double[] toBodyFrame(double[] vector)
throws java.lang.UnsupportedOperationException
vector - double[] The original coordinates in the space
java.lang.UnsupportedOperationExceptionpublic void loadUnmutableObjects(XMLControl control)
control - XMLControl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||