|
|||||||||
| 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.CubicalHotpot
public class CubicalHotpot
This class can be used as a cubical interactive hotspot.
| Constructor Summary | |
|---|---|
CubicalHotpot(Point3D pos,
float width,
float height,
float length,
boolean needsItem)
Creates a new cubical hot spot with the specified dimensions at the specified position. |
|
| Method Summary | |
|---|---|
void |
draw(javax.media.opengl.GL gl)
Visualizes the interactive hotspot. |
float |
getHeight()
Returns the height of the hotspot |
float |
getLength()
Returns the length of the hotspot. |
Point3D |
getMouseOverHotspot(int screenX,
int screenY)
Returns the world coordinates of the mouse position over the hotspot. |
float |
getWidth()
Returns the width of the 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 |
setHeight(float height)
Sets the height of the hotspot. |
void |
setLength(float length)
Sets the length of the hotspot |
void |
setWidth(float width)
Sets the width 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 CubicalHotpot(Point3D pos,
float width,
float height,
float length,
boolean needsItem)
pos - position of the hotspotwidth - width of the hotspotheight - height of the hotspotlength - length of the hotspotneedsItem - needs item to use? --> true=yes, false=no| Method Detail |
|---|
public float getHeight()
public void setHeight(float height)
height - the height to setpublic float getLength()
public void setLength(float length)
length - the length to setpublic float getWidth()
public void setWidth(float width)
width - the width to setpublic void draw(javax.media.opengl.GL gl)
AbstractInteractiveHotspot
draw in class AbstractInteractiveHotspot
public boolean isMouseOverHotspot(int screenX,
int screenY)
AbstractInteractiveHotspot
isMouseOverHotspot in class AbstractInteractiveHotspotscreenX - screen x-coordinatescreenY - screen y-coordinate
public Point3D getMouseOverHotspot(int screenX,
int screenY)
AbstractInteractiveHotspot
getMouseOverHotspot in class AbstractInteractiveHotspotscreenX - screen x-coordinatescreenY - screen y-coordinate
public boolean isWithinFrustum(ViewingFrustum frustum)
AbstractInteractiveHotspot
isWithinFrustum in class AbstractInteractiveHotspotfrustum - the camera's viewing frustum
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||