org.hfbk.vis.visnode.VisNodeMousable Class Reference

Inheritance diagram for org.hfbk.vis.visnode.VisNodeMousable:

Inheritance graph
[legend]
Collaboration diagram for org.hfbk.vis.visnode.VisNodeMousable:

Collaboration graph
[legend]
List of all members.

Public Attributes

float w = 12
float h = 4

Protected Attributes

boolean isHoovered = false
boolean isDragged = false

Package Functions

 VisNodeMousable (Node node, Vector3f position)
abstract void handleEvent (VisMouseEvent evt)
boolean hit (Ray mouseray, Vector3f hit)
Ray buildRay (Vector4f raystart, Vector4f rayend)
Ray buildRay (float x, float y)
void handleEvents (List< AWTEvent > events)
float getExtends ()

Package Attributes

final float MINDEPTH = 12

Classes

class  Ray
class  VisMouseEvent

Detailed Description

A mouseable node, which reacts to the mouse in some kind. the default geometry for receiving clicks is a flat rectangle along the x-y-plane, ranging from -w/2,h/2 to w/2,h/2.

handleEvent() will be called upon a hit and must be overridden.

hit should be overriden to define another hitable geometry.

As the node doesn't know about others (maybe obscuring ones), the hit is detected in two phases: 1. All nodes who receive mouse clicks challenge the previous ones click event for the foremost position 2. At the next frame, only the one click event survivor is feed back to invoke the event handler.

So we have a two frame latency from click to reaction. Maybe we replace this by a separate event processing facility called in the same frame.

Definition at line 40 of file VisNodeMousable.java.


Constructor & Destructor Documentation

org.hfbk.vis.visnode.VisNodeMousable.VisNodeMousable ( Node  node,
Vector3f  position 
) [package]

Definition at line 53 of file VisNodeMousable.java.

References org.hfbk.vis.visnode.VisNode.node.


Member Function Documentation

abstract void org.hfbk.vis.visnode.VisNodeMousable.handleEvent ( VisMouseEvent  evt  )  [package, pure virtual]

a mouse event occured on this node. implement this to handle it.

Referenced by org.hfbk.vis.visnode.VisNodeMousable.handleEvents().

Here is the caller graph for this function:

boolean org.hfbk.vis.visnode.VisNodeMousable.hit ( Ray  mouseray,
Vector3f  hit 
) [package]

checks wether a ray hits this node and returns the intersection. the intersection should be returned if possible, even if not hit, for example a plane could be intersected even if the rectangular hit zone in it is not hit. This allows for extending the object space for dragging etc.

default behaveiour tests against a rectangle ranging from -w/2,-h/2 to w/2,h/2. This should be overridden for other geometry.

Parameters:
mouseray 
hit the position of hit
Returns:
if hit

Definition at line 92 of file VisNodeMousable.java.

References org.hfbk.vis.visnode.VisNodeMousable.Ray.dir, org.hfbk.vis.visnode.VisNodeMousable.h, org.hfbk.vis.visnode.VisNodeMousable.Ray.start, and org.hfbk.vis.visnode.VisNodeMousable.w.

Referenced by org.hfbk.vis.visnode.VisNodeMousable.handleEvents().

Here is the caller graph for this function:

Ray org.hfbk.vis.visnode.VisNodeMousable.buildRay ( Vector4f  raystart,
Vector4f  rayend 
) [package]

build a Ray by projecting the given positions into local space. this can then be checked against collision with this object via hit(), resulting in a hit to this object.

Returns:
a ray originating from raystart towards rayend

Definition at line 118 of file VisNodeMousable.java.

References org.hfbk.vis.visnode.VisNode.currentTransform, and org.hfbk.vis.visnode.VisNode.transform().

Referenced by org.hfbk.vis.visnode.VisNodeMousable.buildRay(), and org.hfbk.vis.visnode.VisNodeMousable.handleEvents().

Here is the call graph for this function:

Here is the caller graph for this function:

Ray org.hfbk.vis.visnode.VisNodeMousable.buildRay ( float  x,
float  y 
) [package]

build a Ray by projecting the given screen position into local space.

See also:
buildRay(Vector3f raystart, Vector3f rayend)
Returns:
a ray originating from the viewer towards the given screen coordinates

Definition at line 145 of file VisNodeMousable.java.

References org.hfbk.vis.visnode.VisNodeMousable.buildRay(), org.hfbk.vis.visnode.VisRoot.client, org.hfbk.vis.visnode.VisNode.getRoot(), and org.hfbk.vis.VisClient.panel.

Here is the call graph for this function:

void org.hfbk.vis.visnode.VisNodeMousable.handleEvents ( List< AWTEvent >  events  )  [package]

extract a mouse click and calls event handlers if we got hit. This is a two phased model: 1. a MouseEvent that hits this object is converted to a VisMouseEvent, challengeing the ones issued earlier. 2. Second, only the frontmost VisMouseEvent of each type is feed back and received here, invoking the appropriate handler.

The resson for this is we don't know about other nodes, so this one cannot decide if it is frontmost on its own.

Reimplemented from org.hfbk.vis.visnode.VisNode.

Definition at line 173 of file VisNodeMousable.java.

References org.hfbk.vis.VisEvent.awtEvent, org.hfbk.vis.visnode.VisNodeMousable.buildRay(), org.hfbk.vis.visnode.VisRoot.client, org.hfbk.vis.visnode.VisNode.getRoot(), org.hfbk.vis.visnode.VisNodeMousable.handleEvent(), org.hfbk.vis.visnode.VisNodeMousable.VisMouseEvent.hit, org.hfbk.vis.visnode.VisNodeMousable.hit(), org.hfbk.vis.VisClient.hoovered, org.hfbk.vis.visnode.VisNodeMousable.isDragged, org.hfbk.vis.visnode.VisNodeMousable.isHoovered, org.hfbk.vis.visnode.VisNodeMousable.MINDEPTH, org.hfbk.vis.VisClient.mouseViewpoint, and org.hfbk.vis.visnode.VisNode.traverse().

Here is the call graph for this function:

float org.hfbk.vis.visnode.VisNodeMousable.getExtends (  )  [package]

recursive travels nodes to get their extends

Returns:
the radius of this node including children

Reimplemented from org.hfbk.vis.visnode.VisNode.

Definition at line 255 of file VisNodeMousable.java.

References org.hfbk.vis.visnode.VisNodeMousable.isDragged.

Referenced by org.hfbk.vis.visnode.VisMolecule.renderSelf().

Here is the caller graph for this function:


Member Data Documentation

final float org.hfbk.vis.visnode.VisNodeMousable.MINDEPTH = 12 [package]

the minimal depth for hitable geometry. allows to grip through near objects which maybe span the whole screen.

Definition at line 47 of file VisNodeMousable.java.

Referenced by org.hfbk.vis.visnode.VisNodeMousable.handleEvents().

boolean org.hfbk.vis.visnode.VisNodeMousable.isHoovered = false [protected]

Definition at line 49 of file VisNodeMousable.java.

Referenced by org.hfbk.vis.visnode.VisNodeMousable.handleEvents(), org.hfbk.vis.visnode.VisText.SmallButton.renderSelf(), org.hfbk.vis.visnode.VisText.renderSelf(), org.hfbk.vis.visnode.VisScale.VisMarker.renderSelf(), org.hfbk.vis.visnode.VisPs.VisCallBall.renderSelf(), org.hfbk.vis.visnode.VisProfiler.VisCallBall.renderSelf(), org.hfbk.vis.visnode.VisLog.LogPoint.renderSelf(), org.hfbk.vis.visnode.VisImagefield.MoreButton.renderSelf(), org.hfbk.vis.visnode.VisImagefield.renderSelf(), org.hfbk.vis.visnode.VisFilesysTree.FileBox.renderSelf(), org.hfbk.vis.visnode.VisFilesys.VisCallBall.renderSelf(), and org.hfbk.vis.visnode.VisButton.renderSelf().

boolean org.hfbk.vis.visnode.VisNodeMousable.isDragged = false [protected]

Definition at line 49 of file VisNodeMousable.java.

Referenced by org.hfbk.vis.visnode.VisNodeMousable.getExtends(), org.hfbk.vis.visnode.VisNodeMousable.handleEvents(), and org.hfbk.vis.visnode.VisDucts.VisDuct.renderSelf().

float org.hfbk.vis.visnode.VisNodeMousable.w = 12

Reimplemented in org.hfbk.vis.visnode.VisUgl.

Definition at line 51 of file VisNodeMousable.java.

Referenced by org.hfbk.vis.visnode.VisNodeMousable.hit(), org.hfbk.vis.visnode.VisLog.LogPoint.LogPoint(), org.hfbk.vis.visnode.VisImagefield.MoreButton.MoreButton(), org.hfbk.vis.visnode.VisVideoImage.renderSelf(), org.hfbk.vis.visnode.VisVideo.renderSelf(), org.hfbk.vis.visnode.VisText.SmallButton.renderSelf(), org.hfbk.vis.visnode.VisText.renderSelf(), org.hfbk.vis.visnode.VisPs.VisCallBall.renderSelf(), org.hfbk.vis.visnode.VisProfiler.VisCallBall.renderSelf(), org.hfbk.vis.visnode.VisMolecule.renderSelf(), org.hfbk.vis.visnode.VisMenu.renderSelf(), org.hfbk.vis.visnode.VisKeyword.renderSelf(), org.hfbk.vis.visnode.VisKeyboard.VisKey.renderSelf(), org.hfbk.vis.visnode.VisInteractive.renderSelf(), org.hfbk.vis.visnode.VisImagefield.renderSelf(), org.hfbk.vis.visnode.VisImage.renderSelf(), org.hfbk.vis.visnode.VisFilesysTree.FileBox.renderSelf(), org.hfbk.vis.visnode.VisButton.renderSelf(), org.hfbk.vis.visnode.VisText.showUI(), org.hfbk.vis.visnode.VisText.SmallButton.SmallButton(), org.hfbk.vis.visnode.VisButton.VisButton(), org.hfbk.vis.visnode.VisPs.VisCallBall.VisCallBall(), org.hfbk.vis.visnode.VisProfiler.VisCallBall.VisCallBall(), org.hfbk.vis.visnode.VisFilesys.VisCallBall.VisCallBall(), org.hfbk.vis.visnode.VisImagefield.VisImagefield(), org.hfbk.vis.visnode.VisInteractive.VisInteractive(), org.hfbk.vis.visnode.VisKeyboard.VisKey.VisKey(), org.hfbk.vis.visnode.VisKeyword.VisKeyword(), org.hfbk.vis.visnode.VisScale.VisMarker.VisMarker(), org.hfbk.vis.visnode.VisMenu.VisMenu(), org.hfbk.vis.visnode.VisTarget.VisTarget(), and org.hfbk.vis.visnode.VisText.VisText().

float org.hfbk.vis.visnode.VisNodeMousable.h = 4

Reimplemented in org.hfbk.vis.visnode.VisUgl.

Definition at line 51 of file VisNodeMousable.java.

Referenced by org.hfbk.vis.visnode.VisMenu.handleEvent(), org.hfbk.vis.visnode.VisNodeMousable.hit(), org.hfbk.vis.visnode.VisLog.LogPoint.LogPoint(), org.hfbk.vis.visnode.VisImagefield.MoreButton.MoreButton(), org.hfbk.vis.visnode.VisButton.renderHelp(), org.hfbk.vis.visnode.VisVideoImage.renderSelf(), org.hfbk.vis.visnode.VisVideo.renderSelf(), org.hfbk.vis.visnode.VisText.SmallButton.renderSelf(), org.hfbk.vis.visnode.VisText.renderSelf(), org.hfbk.vis.visnode.VisPs.VisCallBall.renderSelf(), org.hfbk.vis.visnode.VisProfiler.VisCallBall.renderSelf(), org.hfbk.vis.visnode.VisMolecule.renderSelf(), org.hfbk.vis.visnode.VisMenu.renderSelf(), org.hfbk.vis.visnode.VisKeyword.renderSelf(), org.hfbk.vis.visnode.VisKeyboard.VisKey.renderSelf(), org.hfbk.vis.visnode.VisInteractive.renderSelf(), org.hfbk.vis.visnode.VisImagefield.renderSelf(), org.hfbk.vis.visnode.VisImage.renderSelf(), org.hfbk.vis.visnode.VisFilesysTree.FileBox.renderSelf(), org.hfbk.vis.visnode.VisButton.renderSelf(), org.hfbk.vis.visnode.VisText.showUI(), org.hfbk.vis.visnode.VisText.SmallButton.SmallButton(), org.hfbk.vis.visnode.VisButton.VisButton(), org.hfbk.vis.visnode.VisPs.VisCallBall.VisCallBall(), org.hfbk.vis.visnode.VisProfiler.VisCallBall.VisCallBall(), org.hfbk.vis.visnode.VisFilesys.VisCallBall.VisCallBall(), org.hfbk.vis.visnode.VisImagefield.VisImagefield(), org.hfbk.vis.visnode.VisInteractive.VisInteractive(), org.hfbk.vis.visnode.VisKeyboard.VisKey.VisKey(), org.hfbk.vis.visnode.VisKeyword.VisKeyword(), org.hfbk.vis.visnode.VisScale.VisMarker.VisMarker(), org.hfbk.vis.visnode.VisMenu.VisMenu(), org.hfbk.vis.visnode.VisTarget.VisTarget(), and org.hfbk.vis.visnode.VisText.VisText().


The documentation for this class was generated from the following file:
Generated on Tue Apr 7 17:59:41 2009 for visclient by  doxygen 1.5.1