Examples of Box3


Examples of ca.eandb.jmist.math.Box3

  /* (non-Javadoc)
   * @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

Examples of ca.eandb.jmist.math.Box3

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

Examples of ca.eandb.jmist.math.Box3

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingBox()
   */
  public Box3 boundingBox() {

    return new Box3(
      this.base.x() - this.radius,
      this.base.y(),
      this.base.z() - this.radius,
      this.base.x() + this.radius,
      this.base.y() + this.height,
View Full Code Here

Examples of ca.eandb.jmist.math.Box3

  public Sphere boundingSphere() {

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

Examples of ca.eandb.jmist.math.Box3

    double rj = r * Math.hypot(u.y(), v.y());
    double rk = r * Math.hypot(u.z(), v.z());

    Point3 c = this.boundingSphere.center();

    return new Box3(
        c.x() - ri,
        c.y() - rj,
        c.z() - rk,
        c.x() + ri,
        c.y() + rj,
View Full Code Here

Examples of ca.eandb.jmist.math.Box3

   * @see ca.eandb.jmist.framework.Bounded3#boundingSphere()
   */
  public Sphere boundingSphere() {

    List<Point3> points = new ArrayList<Point3>();
    Box3 bounds = grid.getBoundingBox();
    int nx = height.rows();
    int nz = height.columns();

    for (int ix = 0; ix < nx; ix++) {
      double x = (double) ix / (double) (nx - 1);
      for (int iz = 0; iz < nz; iz++) {
        double z = (double) iz / (double) (nz - 1);
        points.add(new Point3(bounds.interpolateX(x), height.at(ix, iz), bounds.interpolateZ(z)));
      }
    }

    return Sphere.smallestContaining(points);

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.