|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbackend.mousehandlerstates.MouseHandlerBaseState
backend.mousehandlerstates.DrawLineIntersectionsState
public class DrawLineIntersectionsState
DrawLineIntersectionState is used in combination with MouseHandler to find the intersection of two lines
Method Summary | |
---|---|
void |
addCircle(SphereCircleModel addMe)
addCircle will add a circle to be processed by this state |
void |
addLine(SphereLineModel addMe)
addLine will add a line to consider for intersection test |
void |
addPoint(float x,
float y,
float z)
addPoints behavior changes based on the current state of the MouseHandler |
void |
addPoint(SpherePointModel addMe)
addPoint will add a point to be processed by the mouse handler depending on when mode it's set it |
void |
enter()
Code in the enter function will be executed when the MouseHandler changes to this state |
void |
exit()
The exit function is always called when the state is being changed to a new state |
static DrawLineIntersectionsState |
instance(SphereWorldModel myWorld)
instance will return an initalized instance of the DrawLineIntersectionState |
void |
newMouseLoc(java.awt.event.MouseEvent newPoint,
javax.vecmath.Point3f worldLoc)
newMouseLoc will be called when the mouse changes location |
void |
reset()
The reset function should reset the state of this state |
boolean |
shouldHighlight(SphereBasicObject highlightMe)
shouldHighlight will return ture if the given SphereBasicObject should be highlighted |
Methods inherited from class backend.mousehandlerstates.MouseHandlerBaseState |
---|
getStateLabel, sendMouseLoc, setSendMouseLoc |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DrawLineIntersectionsState instance(SphereWorldModel myWorld)
myWorld
- The SphereWorldModel to work with
public void addLine(SphereLineModel addMe)
addLine
in class MouseHandlerBaseState
addMe
- will add a SphereLineModelpublic void addPoint(float x, float y, float z)
MouseHandlerBaseState
addPoint
in class MouseHandlerBaseState
x
- is the x point to work withy
- is the y point to add to the worldz
- is the z point to add to the worldpublic void exit()
MouseHandlerBaseState
exit
in class MouseHandlerBaseState
public void reset()
MouseHandlerBaseState
reset
in class MouseHandlerBaseState
public void addCircle(SphereCircleModel addMe)
MouseHandlerBaseState
addCircle
in class MouseHandlerBaseState
addMe
- a SphereCircleModel to be added for processingpublic boolean shouldHighlight(SphereBasicObject highlightMe)
MouseHandlerBaseState
shouldHighlight
in class MouseHandlerBaseState
highlightMe
- the SphereBasicObject to test for highlighting. It
will be assumed that the mouse is already hovering over this object. Do
not think this function will test for that as well!
public void enter()
MouseHandlerBaseState
enter
in class MouseHandlerBaseState
public void addPoint(SpherePointModel addMe)
MouseHandlerBaseState
addPoint
in class MouseHandlerBaseState
addMe
- the point to add in SpheriosityPoint formpublic void newMouseLoc(java.awt.event.MouseEvent newPoint, javax.vecmath.Point3f worldLoc)
MouseHandlerBaseState
newMouseLoc
in class MouseHandlerBaseState
newPoint
- is the MouseEvent which has the latest mouse position
stored in itworldLoc
- will be the mouse point in world coordinantes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |