Processing Newbie... but I've done my fair share of forum searching and looking at examples online and using Open Processing.
I'm trying to use an ArrayList, not an Array, to build a 3D point selector like
Johan's example. I tried to replace my ArrayList name in the Array spots but no luck. I'm using an ArrayList because I may be doing a lot of adding/deleting of points. Can someone take a quick look? I'm a few days into banging my head here. Thank you so much!
// 3D POINT CREATOR
// Simple 3D World in prep for making a 3D vector field
// Currently, I can make points but cannot select them
import peasy.*;
import controlP5.*;
import processing.opengl.*;
PeasyCam cam;
PeasyDragHandler PanDragHandler;
PeasyDragHandler ZoomDragHandler;
PeasyDragHandler RotateDragHandler;
PeasyWheelHandler ZoomWheelHandler;
ControlP5 controlP5;
PMatrix3D currCameraMatrix;
PGraphics3D g3;
float PointX;
float PointY;
float PointZ;
Slider x1, y1, z1;
Bang b1;
ArrayList myCharges;
void setup() {
size(700, 700, OPENGL);
g3 = (PGraphics3D)g;
cam = new PeasyCam(this, 300);
// Sets center or rotation
cam.lookAt(0, 0, 0);
//camera.setRotations(-0.75, -0.5, 0.5);
cam.setMinimumDistance(100);
cam.setMaximumDistance(1000);
perspectiveView();
//topView();
// Remap PeaseyCam Mouse like Rhino3D
PanDragHandler = cam.getPanDragHandler();
ZoomDragHandler = cam.getZoomDragHandler();
RotateDragHandler = cam.getRotateDragHandler();
ZoomWheelHandler = cam.getZoomWheelHandler();
cam.setLeftDragHandler(null);
cam.setCenterDragHandler(PanDragHandler);
cam.setRightDragHandler(RotateDragHandler);
cam.setWheelHandler(ZoomWheelHandler);
// Interface Sliders
controlP5 = new ControlP5(this);
x1 = controlP5.addSlider("X Value", -100, 100, PointX, 20, 620, 200, 10); // name, min, max, default, x, y, w, h