|
|||||||||
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
public abstract class AbstractInteractiveHotspot
This abstract class represents an interactive hotspot in the game. Interactives hotspot are invisible volumes that can behave interactively. You can specify, if items can be applied to the hotspot or if the hotspot can be used without an item (such as light switches).
Constructor Summary | |
---|---|
AbstractInteractiveHotspot(Point3D pos,
boolean needsItem)
Creates a new interactive hotspot at the specified position. |
Method Summary | |
---|---|
void |
destroy()
This method does have no effect on interactive hotspots |
abstract void |
draw(javax.media.opengl.GL gl)
Visualizes the interactive hotspot. |
AbstractMesh |
getMesh()
Interactive hotspots don't have meshes assignes, so this method always returns null . |
abstract Point3D |
getMouseOverHotspot(int screenX,
int screenY)
Returns the world coordinates of the mouse position over the hotspot. |
Point3D |
getPosition()
Returns the position of the interactive hotspot. |
boolean |
isEnabled()
Determines whether or not the interactive hotspot is enabled. |
abstract boolean |
isMouseOverHotspot(int screenX,
int screenY)
Determines whether the mouse is located over the interactive hotspot. |
abstract boolean |
isWithinFrustum(ViewingFrustum frustum)
Determines whether or not the hotspot volume is within the camera's viewing frustum. |
boolean |
needsItem()
Determines whether or not the hotspot needs an item to be useable. |
void |
setEnabled(boolean enable)
Sets whether or not this hotspot is enabled. |
void |
setNeedsItem(boolean needsItem)
Set whether or not the hotspot needs an item applied to be useable. |
void |
setPosition(Point3D pos)
Sets the position of the interactive hotspot. |
java.lang.String |
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 AbstractInteractiveHotspot(Point3D pos, boolean needsItem)
pos
- position of the hotspotneedsItem
- needs item to use? --> true=yes, false=noMethod Detail |
---|
public Point3D getPosition()
public void setPosition(Point3D pos)
pos
- position of the hotspotpublic void setNeedsItem(boolean needsItem)
needsItem
- needs an item? --> true=yes, false=nopublic boolean needsItem()
public boolean isEnabled()
isEnabled
in class AbstractEntity
public void setEnabled(boolean enable)
setEnabled
in class AbstractEntity
enable
- set enabled? --> true=yes, false=nopublic void destroy()
destroy
in class AbstractEntity
public AbstractMesh getMesh()
null
.
getMesh
in class AbstractEntity
public java.lang.String toString()
toString
in class AbstractEntity
public abstract boolean isMouseOverHotspot(int screenX, int screenY)
screenX
- screen x-coordinatescreenY
- screen y-coordinate
public abstract Point3D getMouseOverHotspot(int screenX, int screenY)
screenX
- screen x-coordinatescreenY
- screen y-coordinate
public abstract boolean isWithinFrustum(ViewingFrustum frustum)
frustum
- the camera's viewing frustum
public abstract void draw(javax.media.opengl.GL gl)
gl
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |