Example #1
0
 private void testDistanceLock1Look2() {
   Vec3 vecLength = Vec3.vec3MinusVec3(look1, look2);
   if (Vec3.lengthVec3(vecLength) < lengthVec3Look) {
     indexLook++;
     if (!isEndVector()) nextVec3Look();
   }
   look1 = Vec3.vec3SummVec3(vecNormalLook, look1);
 }
Example #2
0
  private void testDistancePos1Pos2() {
    Vec3 vecLength = Vec3.vec3MinusVec3(pos1, pos2);
    if (Vec3.lengthVec3(vecLength) < lengthVec3Pos) {
      indexPos++;
      if (!isEndVector()) nextVec3Pos();
    }

    pos1 = Vec3.vec3SummVec3(vecNormalPos, pos1);
  }
Example #3
0
  private void nextVec3Look() {

    if (indexLook + 1 >= vectorLook.size()) return;
    look1 = vectorLook.get(indexLook);
    look2 = vectorLook.get(indexLook + 1);
    Vec3 normalLook2 = Vec3.vec3MinusVec3(look1, look2);
    normalLook2 = Vec3.vec3Normal(normalLook2);
    normalLook2 = Vec3.Vec3MulVec3(normalLook2, speedLook);
    vecNormalLook = new Vec3(normalLook2);
    lengthVec3Look = Vec3.lengthVec3(vecNormalLook);
  }
Example #4
0
  private void nextVec3Pos() {
    if (indexPos + 1 >= vectorPos.size()) return;
    pos1 = vectorPos.get(indexPos);
    pos2 = vectorPos.get(indexPos + 1);

    Vec3 normalPos2 = Vec3.vec3MinusVec3(pos1, pos2);
    normalPos2 = Vec3.vec3Normal(normalPos2);
    normalPos2 = Vec3.Vec3MulVec3(normalPos2, speedPos);
    vecNormalPos = new Vec3(normalPos2);
    lengthVec3Pos = Vec3.lengthVec3(vecNormalPos);
  }