|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimogl.collision.ObjectPicker
public class ObjectPicker
This class can be used to create objects that encapsulate picking operations on object of the scene
Constructor Summary | |
---|---|
ObjectPicker(java.util.ArrayList<AbstractGameObject> gameObjects,
Camera cam,
float pickDiameter)
Creates a new picking object for the specified list of game objects |
Method Summary | |
---|---|
AbstractGameObject |
getObjectAtBack(javax.media.opengl.GL gl,
int mouseX,
int mouseY)
Returns the game object that lies at back to the viewer at most |
AbstractGameObject |
getObjectInFront(javax.media.opengl.GL gl,
int mouseX,
int mouseY)
Returns the game object that lies in front to the viewer at most. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ObjectPicker(java.util.ArrayList<AbstractGameObject> gameObjects, Camera cam, float pickDiameter)
gameObjects
- list of game objects that can be picked with
this picking objectcam
- camera objectpickDiameter
- diameter of the picking area around the mouseMethod Detail |
---|
public AbstractGameObject getObjectInFront(javax.media.opengl.GL gl, int mouseX, int mouseY)
gl
- mouseX
- mouse x-positionmouseY
- mouse y-position
public AbstractGameObject getObjectAtBack(javax.media.opengl.GL gl, int mouseX, int mouseY)
gl
- mouseX
- mouse x-positionmouseY
- mouse y-position
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |