Pj3d
Pj3d Mouse

Methods of the Pj3d object to detect mouse clicks and position. Please make sure that the Pj3d window is active.

Example:
Pj3d p = new Pj3d(this, 640, 480);
if (p.mousePressed == true)
{
    println("mouse position: x-"+p.mouseX+" y-"+p.mouseY);
}

Download: Pj3dInteraction.pde

Methods:
mousePressed
Check if the mouse button is pressed.
returns: Boolean

mouseReleased
Check if the mouse button has been released.
returns: Boolean

mouseX
X position of the mouse
returns: int

mouseY
Y position of the mouse
returns: int

<- back