Examples of VField


Examples of vrml.external.FreeWRLEAI.VField

    }

    private void sendState(long id)
    {

  VField value;
  VRMLObject obj;
 
  // We can only send information if we are connected
        if (connected) {
    RtpiState state = null;

    // Get the subcomponent information for the requested subID
    Subcomponent comp = this.getSubcomponent(id);
    obj = observer.getObject((int) id);
    System.out.println("In send STATE for sub: " + comp + " obj: " + obj);

    // Create a new RTP/I state for this subcomponent
    try {
      state = new RtpiState((int) participantID, (long) id, (int)comp.getNextStateSequenceNumber(), 10, 3, System.currentTimeMillis(), rtpi.getCombinedHeaderSize());
    }
    catch (Exception e) {
      System.out.println(e + " Could not create rtpi state for transmission");
      return;
    }
 
    // Write field type information (rotation or transformation), and data to state
    try {
      OutputStream os = state.getOutputStream();
      DataOutputStream dos = new DataOutputStream(os);
      //System.out.println("should be writing avatar: " + comp.getAvatar());
      //System.out.println("should be writing name: " + comp.getUsername());
      //System.out.println("should be writing ssrc: " + observer.getSSRC(id));
      //System.out.println("should be writing translation: " + comp.getTranslation());
      //System.out.println("should be writing rotation: " + comp.getRotation());
      dos.writeUTF(comp.getAvatar());
      dos.writeUTF(comp.getUsername());
      dos.writeUTF(observer.getSSRC(id));
      value = comp.getTranslation();
      value.write(dos);
      value = comp.getRotation();
      value.write(dos);
     
      // Fake event & owned object fields for now

      dos.writeInt(comp.getNumActions());
      for (int i = 0; i < comp.getNumActions(); i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.