|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mines.jtk.sgl.Node
edu.mines.jtk.sgl.Group
edu.mines.jtk.sgl.AxisAlignedFrame
public class AxisAlignedFrame
An axis-aligned frame is a group of axis-aligned panels. A frame's geometry is an axis-aligned quadrilateral defined by an axis and two corner points. The axis is perpendicular to the plane containing the quadrilateral. The corner points are a pair of opposite vertices of the quadrilateral. Each corner point has three (X,Y,Z) coordinate values. For the axis that is orthogonal to the plane of this frame, the corresponding coordinate values of the two corner points are equal.
By convention, axis-aligned panel children of axis-aligned frames honor their parent frame's geometry when drawing, picking, etc. This convention keeps multiple panel children consistent as their frame is moved and resized.
Panels do not typically control the geometry of their frame, but they may set a box constraint on the corner points of that frame. For example, a panel may constrain those corner points to lie on a sampling grid. Only one constraint, the last one set, is applied. A frame does not attempt to reconcile inconsistent constraints.
| Constructor Summary | |
|---|---|
AxisAlignedFrame(Axis axis,
Point3 pa,
Point3 pb)
Constructs a frame with specified axis and corner points. |
|
| Method Summary | |
|---|---|
void |
addChild(Node node)
Adds the specified child node to this group's list of children. |
Axis |
getAxis()
Gets the axis for this frame. |
BoxConstraint |
getBoxConstraint()
Gets the box constraint for this frame. |
Point3 |
getCorner(int index)
Gets the corner point with specified index for this frame. |
Point3 |
getCornerMax()
Gets the maximum corner point for this frame. |
Point3 |
getCornerMin()
Gets the minimum corner point for this frame. |
void |
removeChild(Node node)
Removes the specified child node from this group's list of children. |
void |
setBoxConstraint(BoxConstraint constraint)
Sets the box constraint for this frame. |
void |
setCorners(Point3 pa,
Point3 pb)
Sets the corner points of (moves and/or resizes) this frame. |
| Methods inherited from class edu.mines.jtk.sgl.Group |
|---|
computeBoundingSphere, countChildren, cull, draw, getAttributeBits, getChildren, pick |
| Methods inherited from class edu.mines.jtk.sgl.Node |
|---|
countParents, cullApply, cullBegin, cullEnd, dirtyBoundingSphere, dirtyDraw, drawApply, drawBegin, drawEnd, getBoundingSphere, getParents, getWorld, isSelected, pickApply, pickBegin, pickEnd, selectedChanged, setSelected, setStates |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AxisAlignedFrame(Axis axis,
Point3 pa,
Point3 pb)
axis - the axis.pa - a corner point.pb - a corner point.| Method Detail |
|---|
public Axis getAxis()
public Point3 getCornerMin()
public Point3 getCornerMax()
public Point3 getCorner(int index)
index - the index in [0,3].
public void setCorners(Point3 pa,
Point3 pb)
The specified corner points must be opposite vertices of the quadrilateral that defines this frame. For the axis that is orthogonal to the plane of this frame, the corresponding (X, Y, or Z) coordinate values of the two points should be equal; this method moves this frame to the average of those two coordinate values.
pa - a corner pointpb - a corner pointpublic BoxConstraint getBoxConstraint()
public void setBoxConstraint(BoxConstraint constraint)
constraint - the box constraint.public void addChild(Node node)
GroupThe child must not be a world (root) node, because a world has no parents. Also, if this group is in a world, the child must not already be in a different world. A node cannot be in more than one world at a time; it must be removed from one world before it can be added to another.
addChild in class Groupnode - the child node.public void removeChild(Node node)
Group
removeChild in class Groupnode - the child node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||