codeanticode.syphon
Class SyphonClient

java.lang.Object
  extended by codeanticode.syphon.SyphonClient

public class SyphonClient
extends java.lang.Object

Syphon client class. It receives textures from a Syphon server.


Field Summary
 processing.core.PGraphics tempDest
           
 
Constructor Summary
SyphonClient(processing.core.PApplet parent)
          Constructor that binds this client to the first available server.
SyphonClient(processing.core.PApplet parent, java.lang.String appName)
          Constructor that binds this client to the specified named server.
SyphonClient(processing.core.PApplet parent, java.lang.String appName, java.lang.String serverName)
          Constructor that binds this client to the specified named server.
 
Method Summary
 boolean available()
          Returns true if a new frame is available.
 processing.core.PGraphics getGraphics(processing.core.PGraphics dest)
          Copies the new frame to a PGraphics object.
 processing.core.PImage getImage(processing.core.PImage dest)
           
 processing.core.PImage getImage(processing.core.PImage dest, boolean loadPixels)
          Copies the new frame to a PImage object.
 java.util.HashMap<java.lang.String,java.lang.String> getServerName()
          Returns a hash map containing two key-value pairs: one (key=="AppName") containing the name of the application running the server bound to this client, the other (key=="ServerName") is the actual name of the server.
static java.util.HashMap<java.lang.String,java.lang.String>[] listServers()
          Returns an array of hash maps containing the names of the currently available Syphon servers.
 void stop()
          Stops the client.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tempDest

public processing.core.PGraphics tempDest
Constructor Detail

SyphonClient

public SyphonClient(processing.core.PApplet parent)
Constructor that binds this client to the first available server.

Parameters:
parent -

SyphonClient

public SyphonClient(processing.core.PApplet parent,
                    java.lang.String appName)
Constructor that binds this client to the specified named server.

Parameters:
parent -
serverName -

SyphonClient

public SyphonClient(processing.core.PApplet parent,
                    java.lang.String appName,
                    java.lang.String serverName)
Constructor that binds this client to the specified named server.

Parameters:
parent -
appName -
serverName -
Method Detail

listServers

public static java.util.HashMap<java.lang.String,java.lang.String>[] listServers()
Returns an array of hash maps containing the names of the currently available Syphon servers.

Returns:
HashMap

getServerName

public java.util.HashMap<java.lang.String,java.lang.String> getServerName()
Returns a hash map containing two key-value pairs: one (key=="AppName") containing the name of the application running the server bound to this client, the other (key=="ServerName") is the actual name of the server.

Returns:
HashMap

available

public boolean available()
Returns true if a new frame is available.

Returns:
boolean

getGraphics

public processing.core.PGraphics getGraphics(processing.core.PGraphics dest)
Copies the new frame to a PGraphics object. It initializes dest if it is null or has the wrong size. It uses FBOs for fast copy.

Parameters:
dest -

getImage

public processing.core.PImage getImage(processing.core.PImage dest)

getImage

public processing.core.PImage getImage(processing.core.PImage dest,
                                       boolean loadPixels)
Copies the new frame to a PImage object. It initializes dest if it is null or has the wrong size.

Parameters:
dest -

stop

public void stop()
Stops the client.



processing library Syphon by Andres Colubri. (c) 2011-2013