|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecty.view.NodeRealizer
y25.view.realizer.DummyNodeRealizer25D
Implementation of a NodeRealizer/25D with no function. This is useful for debugging.
Field Summary |
Fields inherited from class y.view.NodeRealizer |
height, HOTSPOT_E, HOTSPOT_N, HOTSPOT_NE, HOTSPOT_NONE, HOTSPOT_NW, HOTSPOT_S, HOTSPOT_SE, HOTSPOT_SW, HOTSPOT_W, width, x, y |
Constructor Summary | |
DummyNodeRealizer25D()
|
Method Summary | |
NodeRealizer |
createCopy(NodeRealizer arg0)
|
double |
getDepth()
Returns the depth of the node, which is its extent in the z-dimension. |
double |
getHeight()
|
BoundingBox |
getRelativeBoundingBox()
Returns the relative bounding box that encompasses the node. |
double |
getWidth()
|
double |
getX()
|
double |
getY()
|
Point3D |
intersect(Point3D source,
Point3D target,
float nodeZ)
Intersects a line segment with this node and returns the intersection point. |
void |
paintGL(GLAutoDrawable drawable,
Camera camera)
Renders the node this realizer belongs to into the given drawable. |
protected void |
paintNode(Graphics2D arg0)
|
void |
setDepth(double depth)
Sets the depth of the node, which is its extent in the z-dimension. |
void |
setLocation(double arg0,
double arg1)
|
void |
setSize(double arg0,
double arg1)
|
void |
setSize(double width,
double height,
double depth)
Sets the size of the node in all three dimensions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DummyNodeRealizer25D()
Method Detail |
public NodeRealizer createCopy(NodeRealizer arg0)
protected void paintNode(Graphics2D arg0)
public double getX()
getX
in interface NodeLayout
public double getY()
getY
in interface NodeLayout
public double getWidth()
getWidth
in interface NodeLayout
public double getHeight()
getHeight
in interface NodeLayout
public void setLocation(double arg0, double arg1)
setLocation
in interface NodeLayout
public void setSize(double arg0, double arg1)
setSize
in interface NodeLayout
public void paintGL(GLAutoDrawable drawable, Camera camera)
NodeRealizer25D
The passed camera is the one that is used to display this node. It can be used, for example, to render a node differently depending on the viewing position, or to display labels that always face the viewer.
paintGL
in interface NodeRealizer25D
public double getDepth()
NodeLayout25D
getDepth
in interface NodeLayout25D
public void setDepth(double depth)
NodeLayout25D
setDepth
in interface NodeLayout25D
public void setSize(double width, double height, double depth)
NodeLayout25D
setSize
in interface NodeLayout25D
public BoundingBox getRelativeBoundingBox()
NodeLayout25D
"Relative" means, that the z-position of the node is treated as the
origin. For example, if a node is located at position (x,y,z) = (4,5,80)
and has a width, height and depth of 4 then the relative bounding box is
defined by the two points bb_min = (2, 3, -2)
and
bb_max = (6, 7, 2)
. Simply put, the z-position of the
node is just irrelevant.
getRelativeBoundingBox
in interface NodeLayout25D
public Point3D intersect(Point3D source, Point3D target, float nodeZ)
NodeRealizer25D
The line segment in three dimensional space is defined by the two points:
source
and target
. Since a node's
z-position is determined only by the layer it resides in, this
information is not available inside the realizer and therefore has to be
passed in nodeZ
.
This method should return an intersection point only if the passed line
segment actually intersects the node. It should return null
,
if the line segment is completely outside or completely inside the node.
If the line segment intersects the node at more than one position, the
first of these intersections has to be returned, i.e. the one that is
closest to source
.
intersect
in interface NodeRealizer25D
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |