Examples of Sphere


Examples of edu.cmu.cs.stage3.math.Sphere

  public Sphere getBoundingSphere( ReferenceFrame asSeenBy, HowMuch howMuch, boolean ignoreHidden ) {
    if( asSeenBy==null ) {
      asSeenBy = this;
    }
    Sphere sphere = new Sphere( null, Double.NaN );
    //Sphere sphere = new Sphere( new Vector3(), 0 );
    updateBoundingSphere( sphere, asSeenBy, howMuch, ignoreHidden );
    return sphere;
  }
View Full Code Here

Examples of gov.nist.microanalysis.NISTMonte.Sphere

            }

            // Create shapes
            double[] normal = Math2.MINUS_Z_AXIS;
            double[] center = Math2.ORIGIN_3D;
            Shape sphere = new Sphere(center, radius);
            Shape upPlane = MultiPlaneShape.createSubstrate(normal, center);
            Shape inclusionShape = new ShapeDifference(sphere, upPlane);

            normal = Math2.Z_AXIS;
            Shape downPlane = MultiPlaneShape.createSubstrate(normal, center);
View Full Code Here

Examples of javafx.scene.shape.Sphere

        Xform hydrogen1SideXform = new Xform();
        Xform hydrogen1Xform = new Xform();
        Xform hydrogen2SideXform = new Xform();
        Xform hydrogen2Xform = new Xform();

        Sphere oxygenSphere = new Sphere(40.0);
        oxygenSphere.setMaterial(redMaterial);

        Sphere hydrogen1Sphere = new Sphere(30.0);
        hydrogen1Sphere.setMaterial(whiteMaterial);
        hydrogen1Sphere.setTranslateX(0.0);

        Sphere hydrogen2Sphere = new Sphere(30.0);
        hydrogen2Sphere.setMaterial(whiteMaterial);
        hydrogen2Sphere.setTranslateZ(0.0);

        Cylinder bond1Cylinder = new Cylinder(5, 100);
        bond1Cylinder.setMaterial(greyMaterial);
        bond1Cylinder.setTranslateX(50.0);
        bond1Cylinder.setRotationAxis(Rotate.Z_AXIS);
View Full Code Here

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

Examples of jinngine.geometry.Sphere

   */
  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

Examples of jinngine.geometry.Sphere

   */
  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

Examples of jinngine.geometry.Sphere

   */
  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

Examples of jinngine.geometry.Sphere

    //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

Examples of jinngine.geometry.Sphere

   */
  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

Examples of jinngine.geometry.Sphere

   * 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
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.