Package com.bulletphysics.collision.dispatch.CollisionWorld

Examples of com.bulletphysics.collision.dispatch.CollisionWorld.ClosestRayResultCallback


  }

  public Object castRay(Vector3f from, Vector3f to, VehicleRaycasterResult result) {
    //RayResultCallback& resultCallback;

    ClosestRayResultCallback rayCallback = new ClosestRayResultCallback(from, to);

    dynamicsWorld.rayTest(from, to, rayCallback);

    if (rayCallback.hasHit()) {
      RigidBody body = RigidBody.upcast(rayCallback.collisionObject);
      if (body != null && body.hasContactResponse()) {
        result.hitPointInWorld.set(rayCallback.hitPointWorld);
        result.hitNormalInWorld.set(rayCallback.hitNormalWorld);
        result.hitNormalInWorld.normalize();
View Full Code Here

TOP

Related Classes of com.bulletphysics.collision.dispatch.CollisionWorld.ClosestRayResultCallback

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.