Package jinngine.geometry

Examples of jinngine.geometry.Sphere


   */
  public void testRay1() {
    RayCast raycast = new RayCast();
   
    // setup cube geometry
    Sphere s1 = new Sphere(1);
    Body b1 = new Body("default", s1);
   
    // pick a point outside the sphere, and let the direction point towards
    // the centre of the sphere.
    Vector3 point = new Vector3(-4, 6, 9);
View Full Code Here


   */
  public void testRay2() {
    RayCast raycast = new RayCast();
   
    // setup cube geometry
    Sphere s1 = new Sphere(1);
    Body b1 = new Body("default", s1);
    b1.setPosition(2,-3,-1);
   
    // pick a point outside the sphere, and let the direction point towards
    // the centre of the sphere.
View Full Code Here

   */
  public void testRay3() {
    RayCast raycast = new RayCast();
   
    // setup sphere geometry
    Sphere s1 = new Sphere(1);
    Body b1 = new Body("default", s1);

    // select a point (5,1,0) and the raydirection (-1,0,0)
    Vector3 point = new Vector3(5, 1, 0);
    Vector3 direction = new Vector3(-1,0,0);
View Full Code Here

   */
  public void testSphereSphere1() {
    GJK gjk = new GJK();
   
    //set up geometries
    Sphere s1 = new Sphere(1);
    Body b1 = new Body("default", s1);
    b1.setPosition(new Vector3(0,3,0));
    Sphere s2 = new Sphere(1);
    Body b2 = new Body("default", s2);
    b2.setPosition(new Vector3(0,0,0));
   
    //closest point vectors
    Vector3 p1 = new Vector3();
View Full Code Here

    //small number
    double a = 1e-3;
       
    //set up geometries
    Sphere s1 = new Sphere(1);
    Body b1 = new Body("default", s1);
    b1.setPosition(new Vector3(0,1+a,0));
    Sphere s2 = new Sphere(1);
    Body b2 = new Body("default", s2);
    b2.setPosition(new Vector3(0,-1-a,0));
   
    //closest point vectors
    Vector3 p1 = new Vector3();
View Full Code Here

   */
  public void testOverlapSphere1() {
    GJK gjk = new GJK();
   
    //set up two spheres, occupying the exact same space
    Sphere s1 = new Sphere(1);
    Body b1 = new Body("default", s1);
    b1.setPosition(new Vector3(0,0,0));
    Sphere s2 = new Sphere(1);
    Body b2 = new Body("default", s2);
    b2.setPosition(new Vector3(0,0,0));
   
    //closest point vectors
    Vector3 p1 = new Vector3();
View Full Code Here

   * be within epsilon precision.
   */
  public void testOverlapSphere2() {
   
    //set up two spheres, occupying the exact same space
    Sphere s1 = new Sphere(1);
    Body b1 = new Body("default", s1);
    b1.setPosition(new Vector3(0,0,0));
    Sphere s2 = new Sphere(1);
    Body b2 = new Body("default", s2);
    b2.setPosition(new Vector3(0,0,0));
   
    int N = 1024*2;
    Vector3 displacement = new Vector3(-4,1,-2);
View Full Code Here

TOP

Related Classes of jinngine.geometry.Sphere

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.