kaleidoscope

a 3D First Person Shooter/Maya style camera for Processing
 

 

 >  ABOUT  |  FAQ  |  EXAMPLES  |  DOWNLOAD  |  REFERENCE

 

 >  HOME  |  javadocs

  setCenterOfRotation()

The Maya/Rhino style camera works by rotating around, and zooming towards, a center point. You can set it

Example:   pushPopCubes - Maya

Example Code

    
import kaleidoscope.*;
import toxi.geom.*;

Camera cam;

void setup(){
    size(400, 400, P3D);

    cam = new AppCamera( this, "MAYA" );

    cam.setCenterPoint( new Vec3D( 100.0, 500.0, 350.0 ) );
}

void draw(){
    background(140, 150, 255);
    lights();
              
    stroke(255); //Draw the origin
    line( 10000, 0, 0, -10000, 0, 0);
    line( 0, 10000, 0, 0, -10000, 0);
    line( 0, 0, 10000, 0, 0, -10000);
}