Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Sphere


  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {
    return new Sphere(Point3.ORIGIN, major + minor);
  }
View Full Code Here


   * Creates a new <code>SphereGeometry</code>.
   * @param center The <code>Point3</code> at the center of the sphere.
   * @param radius The radius of the sphere.
   */
  public SphereGeometry(Point3 center, double radius) {
    this.sphere = new Sphere(center, radius);
  }
View Full Code Here

   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  @Override
  public Sphere boundingSphere() {
    Box3 boundingBox = this.boundingBox();
    return new Sphere(boundingBox.center(), boundingBox.diagonal() / 2.0);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {
    Box3 boundingBox = boundingBox();
    return new Sphere(boundingBox.center(), boundingBox.diagonal() / 2.0);
  }
View Full Code Here

    double  h = this.height / 2.0;
    double  r = Math.sqrt(this.radius * this.radius + h * h);
    Point3  c = new Point3(this.base.x(), this.base.y() + h, this.base.z());

    return new Sphere(c, r);

  }
View Full Code Here

    /* The default behavior is to return the sphere that bounds the
     * bounding box.
     */
    Box3 boundingBox = this.boundingBox();

    return new Sphere(boundingBox.center(), boundingBox.diagonal() / 2.0);

  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {
    return new Sphere(Point3.ORIGIN, Math.sqrt(2.0));
  }
View Full Code Here

   * @param radius The radius of the disc (in meters).
   * @param twoSided A value indicating whether the disc is two sided.
   */
  public DiscGeometry(Point3 center, Vector3 normal, double radius, boolean twoSided) {
    this.plane = Plane3.throughPoint(center, normal);
    this.boundingSphere = new Sphere(center, radius);
    this.twoSided = twoSided;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {
    return new Sphere(this.box.center(), this.box.diagonal() / 2.0);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {
    return new Sphere(box.center(), 0.5 * box.diagonal() + bevelRadius);
  }
View Full Code Here

TOP

Related Classes of ca.eandb.jmist.math.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.