|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.adventure.entity.AbstractEntity
de.rico.adventure.entity.hotspot.AbstractInteractiveHotspot
de.rico.adventure.entity.hotspot.SphericalHotspot
public class SphericalHotspot
This class represents a spherial interactive hotspot.
Constructor Summary | |
---|---|
SphericalHotspot(Point3D pos,
float radius,
boolean needsItem)
Creates a new spherical hot spot with the specified radius at the specified position. |
Method Summary | |
---|---|
void |
draw(javax.media.opengl.GL gl)
Visualizes the interactive hotspot. |
Point3D |
getMouseOverHotspot(int screenX,
int screenY)
Returns the world coordinates of the mouse position over the hotspot. |
float |
getRadius()
Returns the radius of the spherical hotspot. |
boolean |
isMouseOverHotspot(int screenX,
int screenY)
Determines whether the mouse is located over the interactive hotspot. |
boolean |
isWithinFrustum(ViewingFrustum frustum)
Determines whether or not the hotspot volume is within the camera's viewing frustum. |
void |
setRadius(float radius)
Sets the radius of the hotspot |
Methods inherited from class de.rico.adventure.entity.hotspot.AbstractInteractiveHotspot |
---|
destroy, getMesh, getPosition, isEnabled, needsItem, setEnabled, setNeedsItem, setPosition, toString |
Methods inherited from class de.rico.adventure.entity.AbstractEntity |
---|
drawScreenName, getScreenName, getScriptId, setScreenName, setScriptId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SphericalHotspot(Point3D pos, float radius, boolean needsItem)
pos
- position of the hotspotradius
- radius of the hotspots sphereneedsItem
- needs item to use? --> true=yes, false=noMethod Detail |
---|
public float getRadius()
public void setRadius(float radius)
radius
- radius of the hotspotpublic boolean isMouseOverHotspot(int screenX, int screenY)
AbstractInteractiveHotspot
isMouseOverHotspot
in class AbstractInteractiveHotspot
screenX
- screen x-coordinatescreenY
- screen y-coordinate
public Point3D getMouseOverHotspot(int screenX, int screenY)
AbstractInteractiveHotspot
getMouseOverHotspot
in class AbstractInteractiveHotspot
screenX
- screen x-coordinatescreenY
- screen y-coordinate
public boolean isWithinFrustum(ViewingFrustum frustum)
AbstractInteractiveHotspot
isWithinFrustum
in class AbstractInteractiveHotspot
frustum
- the camera's viewing frustum
public void draw(javax.media.opengl.GL gl)
AbstractInteractiveHotspot
draw
in class AbstractInteractiveHotspot
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |