| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Element
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 | |
|---|---|
 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.  | 
| Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource | 
|---|
addInteractionListener, getInteractionTarget, removeInteractionListener | 
| Field Detail | 
|---|
static final int TARGET_POSITION
static final int TARGET_SIZE
| Method Detail | 
|---|
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()
Style getStyle()
Stylevoid setTransformation(Transformation transformation)
transformation - the new transformationTransformationTransformation getTransformation()
double[] toSpaceFrame(double[] vector)
vector - double[] The original coordinates in the body frame
double[] toBodyFrame(double[] vector)
                     throws java.lang.UnsupportedOperationException
vector - double[] The original coordinates in the space
java.lang.UnsupportedOperationExceptionvoid loadUnmutableObjects(XMLControl control)
control - XMLControl
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||