|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.Group
public class Group
Title: Group
Description: A Group is an element that is made of other elements.
The group's position, size, visibility and transformation do affect the elements in the group. The group's style doesn't, though.
Style
Nested Class Summary | |
---|---|
protected static class |
Group.Loader
|
Field Summary |
---|
Fields inherited from class org.opensourcephysics.display3d.simple3d.Element |
---|
targetPosition, targetSize |
Fields inherited from interface org.opensourcephysics.display3d.core.Element |
---|
TARGET_POSITION, TARGET_SIZE |
Constructor Summary | |
---|---|
Group()
|
Method Summary | |
---|---|
void |
addElement(Element element)
Adds an Element to this Group. |
void |
addElements(java.util.Collection elements)
|
Element |
getElement(int index)
Gets the elements of the group at a given index. |
java.util.ArrayList |
getElements()
Gets the cloned list of Elements in the group. |
void |
getExtrema(double[] min,
double[] max)
Returns the extreme points of a box that contains the element. |
static XML.ObjectLoader |
getLoader()
|
InteractionTarget |
getTargetHit(int x,
int y)
Gets the target that is under the (x,y) position of the screen |
void |
removeAllElements()
Removes all Elements from this Group |
void |
removeElement(Element element)
Removes an Element from this Group |
Methods inherited from class org.opensourcephysics.display3d.simple3d.Element |
---|
addInteractionListener, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display3d.core.Element |
---|
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 |
Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource |
---|
addInteractionListener, getInteractionTarget, removeInteractionListener |
Constructor Detail |
---|
public Group()
Method Detail |
---|
public void addElement(Element element)
Group
addElement
in interface Group
element
- ElementElement
public void addElements(java.util.Collection elements)
public void removeElement(Element element)
Group
removeElement
in interface Group
element
- ElementElement
public void removeAllElements()
Group
removeAllElements
in interface Group
Element
public java.util.ArrayList getElements()
Group
getElements
in interface Group
public Element getElement(int index)
Group
getElement
in interface Group
public void getExtrema(double[] min, double[] max)
Element
min
- double[] A previously allocated double[3] array that will hold
the minimum pointmax
- double[] A previously allocated double[3] array that will hold
the maximum pointpublic InteractionTarget getTargetHit(int x, int y)
Element
getTargetHit
in class Element
x
- inty
- int
public static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |