Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Sphere


  @Override
  public Sphere boundingSphere() {
    if (bbox == null) {
      computeBoundingBox();
    }
    return new Sphere(bbox.center(), 0.5 * bbox.diagonal());
  }
View Full Code Here


  public synchronized void addVertex(Sphere sphere) {
    addVertex(sphere, false);
  }

  public synchronized void addVertex(Point3 p, double radius, boolean skip) {
    addVertex(new Sphere(p, radius), skip);
  }
View Full Code Here

  @Override
  public Sphere boundingSphere() {
    if (bound == null) {
      computeBoundingBox();
    }
    return new Sphere(bound.center(), bound.diagonal() / 2.0);
  }
View Full Code Here

   * @see ca.eandb.jmist.framework.scene.SceneElementDecorator#getBoundingSphere(int)
   */
  @Override
  public Sphere getBoundingSphere(int index) {
    Box3 b = super.getBoundingBox(index);
    return new Sphere(b.center(), b.diagonal() / 2.0);
  }
View Full Code Here

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

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {
    double yc = (height * height - radius * radius) / (2.0 * height);
    return yc > 0.0 ? new Sphere(new Point3(0, yc, 0), height - yc)
        : new Sphere(Point3.ORIGIN, radius);
  }
View Full Code Here

  public Sphere boundingSphere() {
    Point3 center = new Point3(0.0, 0.5 * (height1 + height2), 0.0);
    double height = Math.abs(height1 - height2);
    double maxR = Math.max(radius1, radius2);
    double radius = Math.sqrt(maxR * maxR + 0.25 * height * height);
    return new Sphere(center, radius);
  }
View Full Code Here

  @Override
  public Sphere boundingSphere() {
    if (bbox == null) {
      computeBoundingBox();
    }
    return new Sphere(bbox.center(), 0.5 * bbox.diagonal());
  }
View Full Code Here

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

      return bound.getBoundingBox();
    }

    public Sphere boundingSphere() {
      Box3 box = boundingBox();
      return new Sphere(box.center(), box.diagonal() / 2.0);
    }
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.