Package ca.eandb.jmist.math

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


        if (h.intersects(slice.range())) {

          Box3 bounds = cell.getBoundingBox();

          /* Get the points on the height field. */
          Point3 p00 = new Point3(bounds.minimumX(), slice.at(0, 0), bounds.minimumZ());
          Point3 p01 = new Point3(bounds.minimumX(), slice.at(0, 1), bounds.maximumZ());
          Point3 p10 = new Point3(bounds.maximumX(), slice.at(1, 0), bounds.minimumZ());
          Point3 p11 = new Point3(bounds.maximumX(), slice.at(1, 1), bounds.maximumZ());

          Plane3 plane;
View Full Code Here


          Box3 bounds = cell.getBoundingBox();

          /* Get the points on the height field. */
          Point3 p00 = new Point3(bounds.minimumX(), slice.at(0, 0), bounds.minimumZ());
          Point3 p01 = new Point3(bounds.minimumX(), slice.at(0, 1), bounds.maximumZ());
          Point3 p10 = new Point3(bounds.maximumX(), slice.at(1, 0), bounds.minimumZ());
          Point3 p11 = new Point3(bounds.maximumX(), slice.at(1, 1), bounds.maximumZ());

          Plane3 plane;
          double t;
View Full Code Here

  @Override
  protected Point2 getTextureCoordinates(GeometryIntersection x) {
    Point3 p = x.getPosition();
    Box3 bounds = grid.getBoundingBox();
    return new Point2(
        (p.x() - bounds.minimumX()) / (bounds.maximumX() - bounds.minimumX()),
        (p.z() - bounds.minimumZ()) / (bounds.maximumZ() - bounds.minimumZ())
    );
  }

  /* (non-Javadoc)
 
View Full Code Here

  @Override
  protected Point2 getTextureCoordinates(GeometryIntersection x) {
    Point3 p = x.getPosition();
    Box3 bounds = grid.getBoundingBox();
    return new Point2(
        (p.x() - bounds.minimumX()) / (bounds.maximumX() - bounds.minimumX()),
        (p.z() - bounds.minimumZ()) / (bounds.maximumZ() - bounds.minimumZ())
    );
  }

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