Examples of BoundingBoxBuilder3


Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

    return inner.visibility(offset + index, ray);
  }

  private synchronized void computeBoundingBox() {
    if (bbox == null) {
      BoundingBoxBuilder3 builder = new BoundingBoxBuilder3();
      for (int i = 0, j = offset; i < size; i++, j++) {
        builder.add(inner.getBoundingBox(j));
      }
      bbox = builder.getBoundingBox();
    }
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingBox()
   */
  public Box3 boundingBox() {
    BoundingBoxBuilder3 builder = new BoundingBoxBuilder3();
    for (PrimitiveGeometry primitive : primitives) {
      builder.add(primitive.boundingBox());
    }
    return builder.getBoundingBox();
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

   * @return The smallest <code>Box3</code> that contains all of the bounding
   *     boxes of the specified <code>Node</code>s.
   */
  private Box3 getBoundingBox(Node[] nodes, int fromIndex, int toIndex) {

    BoundingBoxBuilder3 builder = new BoundingBoxBuilder3();

    for (int i = fromIndex; i <= toIndex; i++) {
      builder.add(nodes[i].bound);
    }

    return builder.getBoundingBox();

  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

  private synchronized void computeBoundingBox() {
    if (bound != null) {
      return;
    }
    BoundingBoxBuilder3 bbox = new BoundingBoxBuilder3();
    for (int i = 0, n = super.getNumPrimitives(); i < n; i++) {
      Box3 b = super.getBoundingBox(i);
      for (int j = 0; j < 8; j++) {
        bbox.add(t.apply(b.corner(j)));
      }
    }
    bound = bbox.getBoundingBox();
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.scene.SceneElementDecorator#getBoundingBox(int)
   */
  @Override
  public Box3 getBoundingBox(int index) {
    BoundingBoxBuilder3 bbox = new BoundingBoxBuilder3();
    Box3 b = super.getBoundingBox(index);
    for (int j = 0; j < 8; j++) {
      bbox.add(t.apply(b.corner(j)));
    }
    return bbox.getBoundingBox();
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.scene.SceneElementDecorator#intersects(int, ca.eandb.jmist.math.Box3)
   */
  @Override
  public boolean intersects(int index, Box3 box) {
    BoundingBoxBuilder3 b = new BoundingBoxBuilder3();
    for (int i = 0; i < 8; i++) {
      b.add(t.applyInverse(box.corner(i)));
    }
    return super.intersects(index, b.getBoundingBox());
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingBox()
   */
  public Box3 boundingBox() {
    BoundingBoxBuilder3 builder = new BoundingBoxBuilder3();
    builder.add(center.plus(basis.u().times( ru)).plus(basis.v().times( rv)));
    builder.add(center.plus(basis.u().times( ru)).plus(basis.v().times(-rv)));
    builder.add(center.plus(basis.u().times(-ru)).plus(basis.v().times( rv)));
    builder.add(center.plus(basis.u().times(-ru)).plus(basis.v().times(-rv)));
    return builder.getBoundingBox();
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

    return children.get(childIndex).visibility(childPrimIndex, ray);
  }

  private synchronized void computeBoundingBox() {
    if (bbox == null) {
      BoundingBoxBuilder3 builder = new BoundingBoxBuilder3();
      for (SceneElement child : children) {
        builder.add(child.boundingBox());
      }
      bbox = builder.getBoundingBox();
    }
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

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

    BoundingBoxBuilder3 builder = new BoundingBoxBuilder3();

    for (Point3 vertex : this.vertices) {
      builder.add(vertex);
    }

    return builder.getBoundingBox();

  }
View Full Code Here

Examples of ca.eandb.jmist.framework.BoundingBoxBuilder3

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Bounded3#boundingBox()
   */
  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
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.