Skip to content

Loading…

allow constructor arguments etc for TCPClient #33

Open
shiffman opened this Issue · 1 comment

2 participants

@shiffman
Owner

It might be convenient in some cases (asynch client for example) to set the initial settings via constructor arguments or methods, i.e.

client = new TCPClient(this,"localhost",9002);
client.setID(99);
client.setAsynchronous(true);
// etc.
client.start();

It would be pretty easy to refactor stuff to support this.

Also, "this" should probably always be the first argument as that is standard.

@tracycollins

I'd love to have this ability.

There are a number of hard-coded values in TCPClient that I'd like to be able to change and get the values of, particularly those values that control the camera and its associated attributes.

Specifically, I'd like to see:

client.setMod(float m);   // currently it's = 1f/10f

client.setCameraZ(float z); 
// currently computed: cameraZ = (p5parent.height/2.0f) / PApplet.tan(PConstants.PI * fieldOfView/360.0f);
client.getCameraZ();

client.setFar(float f); // currently hard-coded = 10000

client.setFrustum(float left, float right, float top, float bottom, float near, float far);
// currently computed using xOffset, yOffset, mWidth, lWidth, mod and cameraZ
client.getFrustum() ;

As I've not yet learned how to compile and install a library in Processing (which I will do when I have the time), I'd greatly appreciate this! :)

Thanks for all of your work!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.