Package soc.qase.state

Examples of soc.qase.state.Origin


    if((bitmask & 0x0002) != 0) {
      x = Utils.shortValue(data, offset);
      y = Utils.shortValue(data, offset + 2);
      z = Utils.shortValue(data, offset + 4);
      offset = offset + 6;
      player.setOrigin(new Origin((int)(0.125 * x), (int)(0.125 * y), (int)(0.125 * z)));
    }
    if((bitmask & 0x0004) != 0) {
      x = Utils.shortValue(data, offset);
      y = Utils.shortValue(data, offset + 2);
      z = Utils.shortValue(data, offset + 4);
View Full Code Here


      z = (int)data[offset + 2];
      if(x < 0) x = x + 256;
      if(y < 0) y = y + 256;
      if(z < 0) z = z + 256;
      offset = offset + 3;
      player.setViewOffset(new Origin(x, y, z));
    }
    if((bitmask & 0x0100) != 0) {
      x = Utils.shortValue(data, offset);
      y = Utils.shortValue(data, offset + 2);
      z = Utils.shortValue(data, offset + 4);
View Full Code Here

      z = (int)data[offset + 2];
      if(x < 0) x = x + 256;
      if(y < 0) y = y + 256;
      if(z < 0) z = z + 256;
      offset = offset + 3;
      player.setGunOffset(new Origin(x, y, z));
      x = (int)data[offset];
      y = (int)data[offset + 1];
      z = (int)data[offset + 2];
      if(x < 0) x = x + 256;
      if(y < 0) y = y + 256;
View Full Code Here

      z = (int)(0.125 * z);
      offset = offset + 2;
    }
    //else result.setZ(0);

    return (offset > prevOff ? new Origin(x, y, z) : null);
  }
View Full Code Here

      z = (int)(0.125 * z);

      offset = offset + 2;
    }

    return (offset > prevOff ? new Origin(x, y, z) : null);
  }
View Full Code Here

      }

      if(key.equals("origin"))
      {
        StringTokenizer st2 = new StringTokenizer(value, " ");
        origin = new Origin(Integer.parseInt(st2.nextToken()), Integer.parseInt(st2.nextToken()), Integer.parseInt(st2.nextToken()));
      }
      else if(key.equals("angle"))
        angles = new Angles(0, Integer.parseInt(value), 0);
      else if(key.equals("light"))
        brightness = Integer.parseInt(value);
View Full Code Here

*  of the Origin.
@return an Origin with xyz set to this.xyz */
/*-------------------------------------------------------------------*/
  public Origin toOrigin()
  {
    return new Origin(this);
  }
View Full Code Here

    short x = Utils.shortValue(data, offset);
    short y = Utils.shortValue(data, offset + 2);
    short z = Utils.shortValue(data, offset + 4);

    offset += 6;
    return new Origin((int)(0.125 * x), (int)(0.125 * y), (int)(0.125 * z));
  }
 
View Full Code Here

    {
      x = Utils.shortValue(data, offset);
      y = Utils.shortValue(data, offset + 2);
      z = Utils.shortValue(data, offset + 4);

      sound.setOrigin(new Origin(x, y, z));
      offset += 6;
    }

    setLength(offset - off);
  }
View Full Code Here

/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
  private Origin processOrigin()
  {
    Origin result = null;
    int x = 0;
    int y = 0;
    int z = 0;

    result = new Origin();

    // process origin
    if((bitmask & 0x00000001) != 0) {
      x = (int)(Utils.shortValue(data, offset));
      x = (int)(0.125 * x);
      result.setX(x);
      offset = offset + 2;
    }
    else result.setX(0);
    if((bitmask & 0x00000002) != 0) {
      y = (int)(Utils.shortValue(data, offset));
      y = (int)(0.125 * y);
      result.setY(y);
      offset = offset + 2;
    }
    else result.setY(0);
    if((bitmask & 0x00000200) != 0) {
      z = (int)(Utils.shortValue(data, offset));
      z = (int)(0.125 * z);
      result.setZ(z);
      offset = offset + 2;
    }
    else result.setZ(0);
    return result;
  }
View Full Code Here

TOP

Related Classes of soc.qase.state.Origin

Copyright © 2018 www.massapicom. 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.