Codota Logo
javax.vecmath
Code IndexAdd Codota to your IDE (free)

How to use javax.vecmath

Best Java code snippets using javax.vecmath (Showing top 20 results out of 846)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: MovingBlocks/Terasology

public BulletSweepCallback(CollisionObject me, org.terasology.math.geom.Vector3f up, float minSlopeDot) {
  super(new Vector3f(), new Vector3f());
  this.me = me;
  this.up = new Vector3f(up.x, up.y, up.z);
  this.minSlopeDot = minSlopeDot;
}
origin: MovingBlocks/Terasology

public static javax.vecmath.Quat4f to(Quat4f v) {
  return new javax.vecmath.Quat4f(v.x, v.y, v.z, v.w);
}
origin: MovingBlocks/Terasology

@Override
public void awakenArea(org.terasology.math.geom.Vector3f pos, float radius) {
  Vector3f min = new Vector3f(VecMath.to(pos));
  min.sub(new Vector3f(0.6f, 0.6f, 0.6f));
  Vector3f max = new Vector3f(VecMath.to(pos));
  max.add(new Vector3f(0.6f, 0.6f, 0.6f));
  discreteDynamicsWorld.awakenRigidBodiesInArea(min, max);
}
origin: MovingBlocks/Terasology

@Override
public CollisionShape rotate(Quat4f rot) {
  CompoundShape newShape = new CompoundShape();
  for (BulletCompoundShapeChild child : childList) {
    CollisionShape rotatedChild = child.childShape.rotate(rot);
    javax.vecmath.Vector3f offset = com.bulletphysics.linearmath.QuaternionUtil.quatRotate(VecMath.to(rot), child.transform.origin, new javax.vecmath.Vector3f());
    newShape.addChildShape(new Transform(new javax.vecmath.Matrix4f(VecMath.to(Rotation.none().getQuat4f()), offset, 1.0f)), ((BulletCollisionShape) rotatedChild).underlyingShape);
  }
  return new BulletCompoundShape(newShape);
}
origin: MovingBlocks/Terasology

private PairCachingGhostObject createCollider(Vector3f pos, ConvexShape shape, short groups, short filters, int collisionFlags) {
  Transform startTransform = new Transform(new Matrix4f(new Quat4f(0, 0, 0, 1), pos, 1.0f));
  PairCachingGhostObject result = new PairCachingGhostObject();
  result.setWorldTransform(startTransform);
  result.setCollisionShape(shape);
  result.setCollisionFlags(collisionFlags);
  discreteDynamicsWorld.addCollisionObject(result, groups, filters);
  return result;
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * used internally, not safe
 */
public void calculateLocalInertia(float mass, javax.vecmath.Vector3f vector) {
  if (cShape == null) {
    return;
  }
  if (this instanceof MeshCollisionShape) {
    vector.set(0, 0, 0);
  } else {
    cShape.calculateLocalInertia(mass, vector);
  }
}
origin: jMonkeyEngine/jmonkeyengine

public static javax.vecmath.Matrix3f convert(com.jme3.math.Matrix3f oldMatrix) {
  javax.vecmath.Matrix3f newMatrix = new javax.vecmath.Matrix3f();
  convert(oldMatrix, newMatrix);
  return newMatrix;
}
origin: MovingBlocks/Terasology

  protected static Transform toBulletTransform(org.terasology.math.Transform transform) {
    return new Transform(
        new javax.vecmath.Matrix4f(VecMath.to(transform.rotation),
            VecMath.to(transform.origin), transform.scale)
    );
  }
}
origin: MovingBlocks/Terasology

@Override
public void applyImpulse(org.terasology.math.geom.Vector3f impulse) {
  pendingImpulse.add(VecMath.to(impulse));
}
origin: MovingBlocks/Terasology

public static javax.vecmath.Vector3f to(Vector3f v) {
  return new javax.vecmath.Vector3f(v.x, v.y, v.z);
}
origin: MovingBlocks/Terasology

  @Override
  public BulletSweepCallback sweep(org.terasology.math.geom.Vector3f startPos, org.terasology.math.geom.Vector3f endPos, float allowedPenetration, float slopeFactor) {
    Transform startTransform = new Transform(new Matrix4f(new Quat4f(0, 0, 0, 1), VecMath.to(startPos), 1.0f));
    Transform endTransform = new Transform(new Matrix4f(new Quat4f(0, 0, 0, 1), VecMath.to(endPos), 1.0f));
    BulletSweepCallback callback = new BulletSweepCallback(collider, new org.terasology.math.geom.Vector3f(0, 1, 0), slopeFactor);
    callback.collisionFilterGroup = collider.getBroadphaseHandle().collisionFilterGroup;
    callback.collisionFilterMask = collider.getBroadphaseHandle().collisionFilterMask;
    callback.collisionFilterMask = (short) (callback.collisionFilterMask & (~StandardCollisionGroup.SENSOR.getFlag()));
    collider.convexSweepTest((ConvexShape) (collider.getCollisionShape()), startTransform, endTransform, callback, allowedPenetration);
    return callback;
  }
}
origin: jMonkeyEngine/jmonkeyengine

public static javax.vecmath.Quat4f convert(com.jme3.math.Quaternion oldQuat) {
  javax.vecmath.Quat4f newQuat = new javax.vecmath.Quat4f();
  convert(oldQuat, newQuat);
  return newQuat;
}
origin: MovingBlocks/Terasology

@Override
public void setLocation(org.terasology.math.geom.Vector3f location) {
  rb.getWorldTransform(pooledTransform);
  pooledTransform.origin.set(VecMath.to(location));
  rb.proceedToTransform(pooledTransform);
}
origin: MovingBlocks/Terasology

@Override
public void applyForce(org.terasology.math.geom.Vector3f force) {
  pendingForce.add(VecMath.to(force));
}
origin: jMonkeyEngine/jmonkeyengine

@Override
public void processTriangle(Vector3f[] triangle, int partId, int triangleIndex) {
  // Three sets of individual lines
  // The new Vector is needed as the given triangle reference is from a pool
  vertices.add(new Vector3f(triangle[0]));
  vertices.add(new Vector3f(triangle[1]));
  vertices.add(new Vector3f(triangle[2]));
}
origin: MovingBlocks/Terasology

@Override
public void setLocation(org.terasology.math.geom.Vector3f loc) {
  collider.getWorldTransform(temp);
  temp.origin.set(VecMath.to(loc));
  collider.setWorldTransform(temp);
}
origin: jMonkeyEngine/jmonkeyengine

public static javax.vecmath.Vector3f convert(com.jme3.math.Vector3f oldVec) {
  javax.vecmath.Vector3f newVec = new javax.vecmath.Vector3f();
  convert(oldVec, newVec);
  return newVec;
}
origin: MovingBlocks/Terasology

@Override
public void setTransform(org.terasology.math.geom.Vector3f location, org.terasology.math.geom.Quat4f orientation) {
  rb.getWorldTransform(pooledTransform);
  pooledTransform.origin.set(VecMath.to(location));
  pooledTransform.setRotation(VecMath.to(orientation));
  rb.proceedToTransform(pooledTransform);
}
origin: MovingBlocks/Terasology

  @Override
  public Vector3f getHalfExtentsWithoutMargin() {
    javax.vecmath.Vector3f out = new javax.vecmath.Vector3f();
    return VecMath.from(boxShape.getHalfExtentsWithoutMargin(out));
  }
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Gets the gravity of the PhysicsSpace
 * @param gravity
 */
public Vector3f getGravity(Vector3f gravity) {
  javax.vecmath.Vector3f tempVec = new javax.vecmath.Vector3f();
  dynamicsWorld.getGravity(tempVec);
  return Converter.convert(tempVec, gravity);
}
javax.vecmath

Most used classes

  • Point3d
  • Vector3d
  • Point2d
  • Vector3f
  • Matrix3d
  • AxisAngle4d,
  • Quat4d,
  • Point3f,
  • Quat4f,
  • Matrix3f,
  • Matrix4f,
  • Color3f,
  • Matrix4d,
  • Point2f,
  • Vector4f,
  • Tuple3d,
  • AxisAngle4f,
  • GMatrix,
  • MismatchedSizeException
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now