Proscene a few basic ? questions

edited September 2016 in Library Questions

turning off the default grid should be ? : scene.setGridIsDrawn(false); But dropping this into the BasicUse example(or any other) I get the error " The function "setGridIsDrawn(boolean)" does not exist"

Is it possible to change the orientation of this default grid ?

My scene consists of a number of small spheres arranged in the shape of a large sphere, I have these small spheres constrained so they can't be moved or scaled, what I would like to do is to be able to read out which one of these small spheres has been clicked/selected.... are there any basic examples anywhere that would show how this could be achieved(I can't see anything in the included examples)

cheers, mala


  • array maybe?

  • thanks phaidon, the array was not the problem I was looking for the function which would tell me if a sphere was selected... this turned out to be .grabsInput()

    I still have no idea why the function to turn off the default grid does not work though.

  • To enable/disable the grid hint use scene.setGridVisualHint(false). Note that the API docs are found here (I have updated my blog references as well).

    Change the grid orientation with code like this:

    stroke(255,0,0); rotateY(HALF_PI);//or whatever scene.drawGrid();//or scene.drawDottedGrid();

    You can even set the scene grid as InteractiveFrame shape (in setup()), e.g., frame = new InteractiveFrame(scene, "drawGrid") or frame = new InteractiveFrame(scene, "drawDottedGrid"). In this case, be sure that the grid color and the background are different, otherwise your grid will be invisible. To color the grid, call scene.drawGrid(PGraphics) within a custom graphics procedure and then set it as the iFrame shape (see an example here).

  • Thank you, that's the info I was looking for!

Sign In or Register to comment.