Package Hexel.math

Examples of Hexel.math.Vector3d.times()


  @Override
  public void render(GL2 gl) {

    Vector3d dir = getDirectionLooking();
    dir.times(10);

    Vector3i closestBlock = this.thingBridge
        .getClosestNonEmptyBlockOnVector(
            new Vector3d(getCameraX(), getCameraY(), getCameraZ()), dir);
View Full Code Here


  }

  @Override
  public BlockAction getBlockAction() {
    Vector3d dir = getDirectionLooking();
    dir.times(10);

    if (this.createBlock) {
      lastDeleteBlock = this.deleteBlock;
      this.createBlock = false;
      if (!this.inventory.hasBlock(this.blockToPlace))
View Full Code Here

    double STEP_SIZE = .01;

    Vector3d v = new Vector3d();
    Vector3d step = Vector3d.Sub(t, v);
    step.unit();
    step.times(STEP_SIZE);

    Vector2d tmp2d = new Vector2d();
    Vector3i tmp3i = new Vector3i();

    Vector3i blockPos = new Vector3i();
View Full Code Here

    double STEP_SIZE = .01;

    Vector3d v = new Vector3d();
    Vector3d step = Vector3d.Sub(t, v);
    step.unit();
    step.times(STEP_SIZE);

    Vector2d tmp2d = new Vector2d();
    Vector3i tmp3i = new Vector3i();

    Vector3i blockPos = new Vector3i();
View Full Code Here

    double STEP_SIZE = .01;

    Vector3d v = new Vector3d();
    Vector3d step = Vector3d.Sub(t, v);
    step.unit();
    step.times(STEP_SIZE);

    Vector3i farthestEmpty = new Vector3i();
    Vector3i blockPos = new Vector3i();

    Vector2d tmp2d = new Vector2d();
View Full Code Here

  public void moveMovable(Movable movable, Vector3d reqMoveVector, Vector3i tmp){

    Vector3d partialMove = new Vector3d(reqMoveVector);

    partialMove.unit();
    partialMove.times(.2);
    Vector3d leftToMove = new Vector3d(reqMoveVector);
    while (leftToMove.mag() > 0){
      if (leftToMove.mag() > partialMove.mag()){
        Movement movement = getMovement((Volumetric) movable,
            partialMove, tmp);
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.