public class AxisAlignedFrame extends Group
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 and Description |
---|
AxisAlignedFrame(Axis axis,
Point3 pa,
Point3 pb)
Constructs a frame with specified axis and corner points.
|
Modifier and Type | Method and Description |
---|---|
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.
|
computeBoundingSphere, countChildren, cull, draw, getAttributeBits, getChildren, pick
countParents, cullApply, cullBegin, cullEnd, dirtyBoundingSphere, dirtyDraw, drawApply, drawBegin, drawEnd, getBoundingSphere, getParents, getStates, getWorld, isSelected, pickApply, pickBegin, pickEnd, selectedChanged, setSelected, setStates
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)
Group
The 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.
public void removeChild(Node node)
Group
removeChild
in class Group
node
- the child node.