NCSA Portfolio

ncsa.j3d
Class TransformGroupCustomer

java.lang.Object
  |
  +--ncsa.j3d.TransformGroupCustomer

public class TransformGroupCustomer
extends java.lang.Object
implements Customer

This object implements the Customer interface and is used to set the PickableTransformGroup's Transform3D to a new value every time the consume method is called. Usage:

Transform3d transform = InterestingObject.getTransform();
TransformGroupCustomer cust = new TransformGroupCustomer(transform);
MulticastHandler multi = new MulticastHandler("128.8.2.2", 3120, cust);
multi.begin();
.
.
.
multi.transmit(buf, len);
.
.
.
multi.end();
In the example above, we wish to send transform information out on a multicast group, and have all other MulticastHandlers listening on the subnet 128.8.2.2 on port 3120 to set the Transform3D for the object InterestingObject when they receive data.

See Also:
MulticastHandler

Constructor Summary
TransformGroupCustomer(PickableTransformGroup transformGroup)
          Specifies a PickableTransformGroup.
 
Method Summary
 void consume(byte[] array, int len)
          When this method is called, the byte array is reconstructed into a Transform3D.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformGroupCustomer

public TransformGroupCustomer(PickableTransformGroup transformGroup)
Specifies a PickableTransformGroup. This PickableTransformGroup will be modified when calls are made to this object's consume method.
Method Detail

consume

public void consume(byte[] array,
                    int len)
When this method is called, the byte array is reconstructed into a Transform3D. The TransformGroup's Transform3D is replaced with this new Transform3D.
Specified by:
consume in interface Customer

NCSA Portfolio

NCSA Portfolio, Copyright 1997-1999, National Center for Supercomputing Applications, University of Illinois Urbana-Champaign, All Rights Reserved