Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Box3.center()


   * @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);
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.scene.SceneElementDecorator#getSurfaceArea()
   */
 
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());
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.geometry.AbstractGeometry#getSurfaceArea(int)
   */
 
View Full Code Here

      return bound.getBoundingBox();
    }

    public Sphere boundingSphere() {
      Box3 box = boundingBox();
      return new Sphere(box.center(), box.diagonal() / 2.0);
    }

    public void intersect(final Ray3 ray, IntersectionRecorder recorder) {
      for (int i = 0; i < vertices.length - 3; i++) {
        final double t = GeometryUtil.rayIntersectTriangle(ray, vertices[i], vertices[i+1], vertices[i+2]);
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

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

  }

  /**
   * Gets the list of child geometries.
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.