Package soc.qase.tools.vecmath

Examples of soc.qase.tools.vecmath.Vector3f


/*-------------------------------------------------------------------*/
/**  Constructor. Allows a node to be specified directly in 3D co-ordinates.
/*-------------------------------------------------------------------*/
  public Waypoint(float x, float y, float z)
  {
    pos = new Vector3f(x, y, z);
  }
View Full Code Here


/**  Obtain the position of this waypoint.
@return a Vector3f indicating the position of this waypoint */
/*-------------------------------------------------------------------*/
  public Vector3f getPosition()
  {
    return new Vector3f(pos);
  }
View Full Code Here

/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
  private Vector3f readDirection()
  {
    int code = data[offset++] & 0xFF;
    return new Vector3f(TemporaryEntity.VERTEXNORMS[code][0], TemporaryEntity.VERTEXNORMS[code][1], TemporaryEntity.VERTEXNORMS[code][2]);
  }
View Full Code Here

/**  Implement the results of MatLab's operations.
@param mlResults the data returned by MatLab */
/*-------------------------------------------------------------------*/
  protected void postMatLab(Object[] mlResults// apply the results which MatLab provided
  {
    setBotMovement(new Vector3f((float[])mlResults[0]), null, 200, PlayerMove.POSTURE_NORMAL);
  }
View Full Code Here

/**  Implement the results of MatLab's operations.
@param mlResults the data returned by MatLab */
/*-------------------------------------------------------------------*/
  protected void postMatLab(Object[] mlResults// apply the results which MatLab provided
  {
    setBotMovement(new Vector3f((float[])mlResults[0]), null, 200, PlayerMove.POSTURE_NORMAL);
  }
View Full Code Here

  protected void setBotMovement(Vector3f moveDir, Vector3f aimDir, float vel, int postureState)
  {
    if(moveDir == null && aimDir == null)
      return;
    else if(moveDir == null)
      moveDir = new Vector3f(aimDir);
    else if(aimDir == null)
      aimDir = new Vector3f(moveDir);

    moveDir2f.set(moveDir.x, moveDir.y);
    aimDir2f.set(aimDir.x, aimDir.y);

    if(vel < 0)
View Full Code Here

@param o the point whose visibility will be checked
@return true if visible, false otherwise */
/*-------------------------------------------------------------------*/
  protected boolean isVisible(Origin o)
  {
    return (o != null && isVisible(new Vector3f(o)));
  }
View Full Code Here

      Entity[] deactEnts = getDeactivatedEntities();

      if(deactEnts != null)
      {
        Vector3f entOrigin = new Vector3f();
        Vector3f playerOrigin = new Vector3f(getPlayer().getPlayerMove().getOrigin());

        int index = -1;
        float curDist = 0;
        float minDist = Float.MAX_VALUE;

        for(int i = 0; i < deactEnts.length; i++)
        {
          deactEnts[i].setConfig(config);
          entOrigin.set(deactEnts[i].getOrigin());

          if(deactEnts[i].getNumber() != playerEntityNum + 1 && deactEnts[i].getNumber() > 0 && (curDist = playerOrigin.distance(entOrigin)) < minDist && deactEnts[i].getInventoryIndex() == pkup)
          {
            minDist = curDist;
            index = deactEnts[i].getNumber();
          }
        }
View Full Code Here

*  of the vector.
@return a Vector3f with xyz set to this.xyz */
/*-------------------------------------------------------------------*/
  public Vector3f toVector3f()
  {
    return new Vector3f(this);
  }
View Full Code Here

TOP

Related Classes of soc.qase.tools.vecmath.Vector3f

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.