Package ca.eandb.jmist.framework

Examples of ca.eandb.jmist.framework.IntersectionDecorator


      throw new IllegalArgumentException("index out of bounds");
    }
    inner.intersect(offset + index, ray, new IntersectionRecorderDecorator(recorder) {
      @Override
      public void record(Intersection intersection) {
        inner.record(new IntersectionDecorator(intersection) {
          @Override
          protected void transformShadingContext(
              ShadingContext context) {
            context.setPrimitiveIndex(index);
          }
View Full Code Here


  public void intersect(Ray3 ray, IntersectionRecorder recorder) {
    recorder = new IntersectionRecorderDecorator(recorder) {

      @Override
      public void record(Intersection intersection) {
        inner.record(new IntersectionDecorator(intersection) {

          @Override
          protected void transformShadingContext(
              ShadingContext context) {
            context.setPrimitiveIndex(context.getPrimitiveIndex() - offset);
View Full Code Here

   */
  @Override
  public void intersect(Ray3 ray, IntersectionRecorder recorder) {
    super.intersect(ray, new IntersectionRecorderDecorator(recorder) {
      public void record(Intersection intersection) {
        inner.record(new IntersectionDecorator(intersection) {
          protected void transformShadingContext(
              ShadingContext context) {
            context.setPrimitiveIndex(0);
          }
        });
View Full Code Here

     *
     * @see ca.eandb.jmist.framework.IntersectionRecorderDecorator#record(ca.eandb.jmist.framework.Intersection)
     */
    @Override
    public void record(Intersection intersection) {
      inner.record(new IntersectionDecorator(intersection) {
        protected void transformShadingContext(ShadingContext context) {
          modifier.modify(context);
        }
      });
    }
View Full Code Here

   * @see ca.eandb.jmist.framework.SceneElement#intersect(int, ca.eandb.jmist.math.Ray3, ca.eandb.jmist.framework.IntersectionRecorder)
   */
  public void intersect(final int index, Ray3 ray, IntersectionRecorder recorder) {
    primitives.get(index).intersect(ray, new IntersectionRecorderDecorator(recorder) {
      public void record(Intersection intersection) {
        inner.record(new IntersectionDecorator(intersection) {
          protected void transformShadingContext(
              ShadingContext context) {
            context.setPrimitiveIndex(index);
          }
        });
View Full Code Here

      super(inner);
    }

    @Override
    public void record(Intersection intersection) {
      inner.record(new IntersectionDecorator(intersection) {
        protected void transformShadingContext(
            ShadingContext context) {
          TransformableSceneElement.this.transformShadingContext(context);
        }
      });
View Full Code Here

     *
     * @see ca.eandb.jmist.framework.IntersectionRecorderDecorator#record(ca.eandb.jmist.framework.Intersection)
     */
    @Override
    public void record(Intersection intersection) {
      inner.record(new IntersectionDecorator(intersection) {
        protected void transformShadingContext(ShadingContext context) {
          applyMaterial(context);
        }
      });
    }
View Full Code Here

    int childIndex = getChildIndex(index);
    int childPrimIndex = index - offsets.get(childIndex);
    children.get(childIndex).intersect(childPrimIndex, ray, new IntersectionRecorderDecorator(recorder) {
      @Override
      public void record(Intersection intersection) {
        inner.record(new IntersectionDecorator(intersection) {
          @Override
          protected void transformShadingContext(
              ShadingContext context) {
            context.setPrimitiveIndex(index);
          }
View Full Code Here

    for (int i = 0, n = children.size(); i < n; i++) {
      final int offset = offsets.get(i);
      children.get(i).intersect(ray, new IntersectionRecorderDecorator(recorder) {
        @Override
        public void record(Intersection intersection) {
          inner.record(new IntersectionDecorator(intersection) {
            @Override
            protected void transformShadingContext(
                ShadingContext context) {
              context.setPrimitiveIndex(offset + context.getPrimitiveIndex());
            }
View Full Code Here

    /* (non-Javadoc)
     * @see ca.eandb.jmist.framework.IntersectionRecorderDecorator#record(ca.eandb.jmist.framework.Intersection)
     */
    @Override
    public void record(Intersection intersection) {
      inner.record(new IntersectionDecorator(intersection) {
        protected void transformShadingContext(ShadingContext context) {
          applyAppearance(context);
        }
      });
    }
View Full Code Here

TOP

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

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.