Package soc.qase.state

Examples of soc.qase.state.Origin


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

    result = new Origin();

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


  protected Entity getNearestEntity(Vector filteredEntities)
  {
    Entity tempEntity = null;
    Entity nearestEntity = null;

    Origin currentPos = getPosition();

    float tempDistance = 0;
    float distance = Float.MAX_VALUE;

    for(int i = 0; i < filteredEntities.size(); i++)
    {
      tempEntity = (Entity)filteredEntities.elementAt(i);
      tempDistance = currentPos.distance(tempEntity.getOrigin());

      if(tempDistance < distance && tempDistance > 0)
      {
        distance = tempDistance;
        nearestEntity = tempEntity;
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.