Pj3d
Pj3d

Instanciate the Pj3d object. Opens a separate window for the 3d content.

Usage:
Pj3d (BApplet b, int width, int height)
Pj3d (PApplet p, int width, int height)
Pj3d (Applet a, int width, int height)

Returns:
Nothing

Example:
Pj3d p = new Pj3d(this, 640, 480);
p.setBackground(100, 100, 100);

Download: Pj3d.pde

Methods:
setBackground(int r, int g, int b)
Change the background color to a new rbg (0-255) color.

setBackground(int color)
Change the background color to a processing color object.

setBackground(String imageLocation)
Set a background texture. The path to the image file must be absolute. Yet only jpegs are working.

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: Integer

mouseY
Y position of the mouse
returns: Integer

keyPressed
Check if a key is pressed.
returns: Boolean

keyReleased
Check if a key has been released.
returns: Boolean

key
Ascii value of the last pressed key. One can cast it with (char)key to a character.
returns: Integer

objectPicked
Check if an object is under the clicked mouse.
returns: Boolean

getPickedObject()
Get a reference to the object that was clicked on.
returns: Pj3dPickable

<- back