allow constructor arguments etc for TCPClient #33

Open
shiffman opened this Issue Jul 23, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@shiffman
Owner

shiffman commented Jul 23, 2013

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

This comment has been minimized.

Show comment
Hide comment
@tracycollins

tracycollins Aug 14, 2013

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!!

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