Package ca.eandb.jmist.framework

Examples of ca.eandb.jmist.framework.NearestIntersectionRecorder


  @Override
  public void intersect(int index, Ray3 ray, IntersectionRecorder recorder) {
    Interval I = recorder.interval();

    do {
      NearestIntersectionRecorder rec = new NearestIntersectionRecorder(I);
      super.intersect(index, ray, rec);

      if (rec.isEmpty()) {
        break;
      }
      Intersection x = rec.nearestIntersection();
      MinimalShadingContext ctx = new MinimalShadingContext(Random.DEFAULT);
      x.prepareShadingContext(ctx);
      Point2 uv = ctx.getUV();
      if (trim.opacity(new Point2(uv.x(), 1.0 - uv.y())) > 0.5) {
        recorder.record(x);
View Full Code Here


  @Override
  public void intersect(Ray3 ray, IntersectionRecorder recorder) {
    Interval I = recorder.interval();

    do {
      NearestIntersectionRecorder rec = new NearestIntersectionRecorder(I);
      super.intersect(ray, rec);

      if (rec.isEmpty()) {
        break;
      }
      Intersection x = rec.nearestIntersection();
      MinimalShadingContext ctx = new MinimalShadingContext(Random.DEFAULT);
      x.prepareShadingContext(ctx);
      Point2 uv = ctx.getUV();
      if (trim.opacity(new Point2(uv.x(), 1.0 - uv.y())) > 0.5) {
        recorder.record(x);
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.scene.SceneElementDecorator#visibility(ca.eandb.jmist.math.Ray3)
   */
  @Override
  public boolean visibility(Ray3 ray) {
    NearestIntersectionRecorder recorder = new NearestIntersectionRecorder(new Interval(0.0, ray.limit()));
    intersect(ray, recorder);
    return recorder.isEmpty();
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.scene.SceneElementDecorator#visibility(ca.eandb.jmist.math.Ray3)
   */
  @Override
  public boolean visibility(Ray3 ray) {
    NearestIntersectionRecorder recorder = new NearestIntersectionRecorder(new Interval(0.0, ray.limit()));
    intersect(ray, recorder);
    return recorder.isEmpty();
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.SceneElement#intersects(int, ca.eandb.jmist.math.Ray3)
   */
  public boolean visibility(int index, Ray3 ray) {
    Interval I = new Interval(0.0, ray.limit());
    NearestIntersectionRecorder recorder = new NearestIntersectionRecorder(I);
    intersect(index, ray, recorder);
    return recorder.isEmpty();
  }
View Full Code Here

TOP

Related Classes of ca.eandb.jmist.framework.NearestIntersectionRecorder

Copyright © 2018 www.massapicom. 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.