I am trying to create a new control in G4P that uses the PeasyCam library but I am getting errors when I try and build G4P.
Here is part of the code that I am trying to build
pcam = new PeasyCam(theApplet, view, (double) dist);
pcam.lookAt(lookAt.x, lookAt.y, lookAt.z);
pcam.setViewport((int)x, (int)y, (int)width, (int)height);
When I try to build it I get the following messages
[javac] /Users/peter/git/g4p-repos/G4P/tmp/G4P/src/g4p_controls/GViewPeasyCam.java:53: error: no suitable constructor found for PeasyCam(PApplet,PGraphics,double)
[javac] pcam = new PeasyCam(theApplet, view, (double) dist);
[javac] ^
[javac] constructor PeasyCam.PeasyCam(PApplet,double,double,double,double) is not applicable
[javac] (actual and formal argument lists differ in length)
[javac] constructor PeasyCam.PeasyCam(PApplet,double) is not applicable
[javac] (actual and formal argument lists differ in length)
[javac] /Users/peter/git/g4p-repos/G4P/tmp/G4P/src/g4p_controls/GViewPeasyCam.java:55: error: cannot find symbol
[javac] pcam.setViewport((int)x, (int)y, (int)width, (int)height);
[javac] ^
[javac] symbol: method setViewport(int,int,int,int)
[javac] location: variable pcam of type PeasyCam
[javac] 2 errors
[javac] 19 warnings
The code does not produce syntax errors and runs in Eclipse. I am using the latest version of Processing (3.4) and PeasyCam (302).
I have added the PeasyCam library jar files to the build path as per normal
Eclipse can see the PeasyCam constructors in the editor but not when building it.
Any thoughts please?