Examples of Box3


Examples of ca.eandb.jmist.math.Box3

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingBox()
   */
  public Box3 boundingBox() {
    return new Box3(
        base.x() - radius,
        base.y(),
        base.z() - radius,
        base.x() + radius,
        base.y() + height,
View Full Code Here

Examples of ca.eandb.jmist.math.Box3

  public Box3 boundingBox() {
    double maxR = Math.max(radius1, radius2);
    double minH = Math.min(height1, height2);
    double maxH = Math.max(height1, height2);

    return new Box3(-maxR, minH, -maxR, maxR, maxH, maxR);
  }
View Full Code Here

Examples of ca.eandb.jmist.math.Box3

  private int split(int axis, double plane, int start, int end, Clip clip) {
    double min, max, mid;
    int split = start;
    clip.reset();
    for (int i = start; i < end; i++) {
      Box3 bound = getBoundingBox(items[i]);
      min = bound.minimum(axis);
      max = bound.maximum(axis);
      mid = 0.5 * (min + max);
      if (mid < plane) {
        if (max > clip.left) {
          clip.left = max;
        }
View Full Code Here

Examples of ca.eandb.jmist.math.Box3

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

Examples of ca.eandb.jmist.math.Box3

      }
      return bound.getBoundingBox();
    }

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

Examples of ca.eandb.jmist.math.Box3

   */
  public Box3 boundingBox() {

    BoundingBoxBuilder3 builder = new BoundingBoxBuilder3();

    Box3 childBoundingBox = geometry.boundingBox();
    for (int i = 0; i < 8; i++) {
      builder.add(this.model.apply(childBoundingBox.corner(i)));
    }

    return builder.getBoundingBox();

  }
View Full Code Here

Examples of ca.eandb.jmist.math.Box3

   */
  public Sphere boundingSphere() {

    List<Point3> corners = new ArrayList<Point3>(8);

    Box3 childBoundingBox = geometry.boundingBox();
    for (int i = 0; i < 8; i++) {
      corners.add(this.model.apply(childBoundingBox.corner(i)));
    }

    return Sphere.smallestContaining(corners);

  }
View Full Code Here

Examples of ca.eandb.jmist.math.Box3

   */
  public Box3 getBoundingBox(int index) {

    BoundingBoxBuilder3 builder = new BoundingBoxBuilder3();

    Box3 childBoundingBox = geometry.getBoundingBox(index);
    for (int i = 0; i < 8; i++) {
      builder.add(this.model.apply(childBoundingBox.corner(i)));
    }

    return builder.getBoundingBox();

  }
View Full Code Here

Examples of ca.eandb.jmist.math.Box3

   */
  public Sphere getBoundingSphere(int index) {

    List<Point3> corners = new ArrayList<Point3>(8);

    Box3 childBoundingBox = geometry.getBoundingBox(index);
    for (int i = 0; i < 8; i++) {
      corners.add(this.model.apply(childBoundingBox.corner(i)));
    }

    return Sphere.smallestContaining(corners);

  }
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(
        -(major + minor), -minor, -(major + minor),
          major + minor ,  minor,   major + minor
    );
  }
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.