Package rlforj.los

Examples of rlforj.los.ShadowCasting


    b.mark(10, 10, '@');
    b.print(-1, 21, -1, 21);
   
    System.out.println("visitederr "+b.visiterr);
   
    a= new ShadowCasting();
    b.visited.clear();
   
    a.visitConeFieldOfView(b, 10, 10, 10, startAngle, finishAngle);
   
    b.mark(10, 10, '@');
View Full Code Here


//    int x1=45, y1=10;
//    tb.exception.add(new Point2I(7, 11));
//    tb.exception.add(new Point2I(13, 12));
   
//    ILosAlgorithm alg = new PrecisePermissive();
    ILosAlgorithm alg = new ShadowCasting();
   
    boolean losExists = alg.existsLineOfSight(tb, 10, 10, x1, y1, true);
    List<Point2I> path=alg.getProjectPath();
   
    for(Point2I p:path) {
      int xx=p.x, yy=p.y;
      tb.mark(xx, yy, '-');
    }
View Full Code Here

import rlforj.los.ShadowCasting;

public class ShadowCastingTest extends FovTest
{
  public ShadowCastingTest() {
    a= new ShadowCasting();
  }
View Full Code Here

    }
//    int startAngle=rand.nextInt(360), finishAngle=rand.nextInt(360);
    int startAngle=30, finishAngle=70;
    System.out.println(startAngle+" degrees to "+finishAngle+" degrees");
    System.out.println("ShadowCasting");
    IConeFovAlgorithm a=new ShadowCasting();
    a.visitConeFieldOfView(b, 10, 10, 9, startAngle, finishAngle);
    b.print(10, 10);
   
    b.resetVisitedAndMarks();
    System.out.println("Precise Permissive");
    a=new ConePrecisePremisive();
    a.visitConeFieldOfView(b, 10, 10, 10, startAngle, finishAngle);
    b.print(10, 10);
  }
View Full Code Here

    }
    int x1=rand.nextInt(21), y1=rand.nextInt(21);
    b.invisibleFloor='.';
    b.invisibleWall='#';
   
    displayProjection(new ShadowCasting(), "Shadowcasting", b, x1, y1);
    displayProjection(new PrecisePermissive(), "Precise Permissive", b, x1, y1);
    displayProjection(new BresLos(false), "Bresenham", b, x1, y1);
    BresLos bl=new BresLos(true);
    displayProjection(bl, "Symmetric Bresenham", b, x1, y1);
    displayProjection(new BresOpportunisticLos(), "Opportunistic Bresenham", b, x1, y1);
View Full Code Here

    for(int i=0; i<30; i++) {
      b.setObstacle(rand.nextInt(21), rand.nextInt(21));
    }
   
    System.out.println("ShadowCasting");
    IFovAlgorithm a=new ShadowCasting();
    a.visitFieldOfView(b, 10, 10, 9);
    b.print(10, 10);
   
    b.resetVisitedAndMarks();
    System.out.println("Precise Permissive");
    a=new PrecisePermissive();
    a.visitFieldOfView(b, 10, 10, 9);
    b.print(10, 10);
  }
View Full Code Here

TOP

Related Classes of rlforj.los.ShadowCasting

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.