Package com.l2client.navigation

Examples of com.l2client.navigation.Path$WayPoint


            // TODO Auto-generated catch block
            e.printStackTrace();
          }
         
          if(ent != null && destination != null){
                Path pa = new Path();
                PositioningComponent pc = (PositioningComponent) em.getComponent(ent.getId(), PositioningComponent.class);
                if(pc != null){
                boolean foundPath = enm.buildNavigationPath(pa, pc.position, destination);
                if(foundPath){
                  NavTestHelper.printPath(pa);
View Full Code Here


//        n = em.getNavMesh(new Vector3f(0,0,0));
//        System.out.println("Navmesh with 0/0 in it is:"+n+" ? 0/0 ?");
       
//        Vector3f sPos = new Vector3f(1.1f,0,1f);
//        Vector3f ePos = new Vector3f(2.9f,0,2.9f);
        Path p = null;
//      NavTestHelper.findPath(em, sPos, ePos);

//        p = NavTestHelper.findPath(em, sPos, ePos);
       
//        NavTestHelper.debugShowPath(assetManager, rootNode, p);
View Full Code Here

        enqueue(new Callable<Object>() {

        @Override
        public Object call() throws Exception {
          debugNodes.detachAllChildren();
            Path p = new Path();
//          p = NavTestHelper.findPath(em, new Vector3f(1.1f,0,1f), new Vector3f(3.1f,0,3f));
          p = NavTestHelper.findPath(em, new Vector3f(260f,0,-20f), new Vector3f(270f,0,10f));
          if(p != null){
//            p.optimize();
          NavTestHelper.debugShowCost(assetManager, debugNodes, p, ColorRGBA.Cyan);
View Full Code Here

        @Override
        public Object call() throws Exception {
         
          debugNodes.detachAllChildren();
            Path p = new Path();
          p = NavTestHelper.findPath(em, new Vector3f(1.1f,0,1f), new Vector3f(3.1f,0,3f));
          if(p != null){
          int s = p.WaypointList().size();
          for(int i =s-1;i>run;i--)
            p.WaypointList().remove(i);
          NavTestHelper.debugShowCost(assetManager, debugNodes, p, ColorRGBA.Cyan);
          NavTestHelper.debugShowPath(assetManager, debugNodes, p);
          NavTestHelper.areCellsConnected(p);
          NavTestHelper.arePointsInCells(p);
          run++;
View Full Code Here

   
    private Entity placeObject(final Vector3f position, final Vector3f destination/*can be null*/){
      final Entity ent =  createEntity(position);

          if(ent != null && destination != null){
                Path pa = new Path();
                PositioningComponent pc = (PositioningComponent) em.getComponent(ent.getId(), PositioningComponent.class);
                if(pc != null){
                  boolean foundPath = enm.buildNavigationPath(pa, pc.position, destination);
                  if(foundPath){
                    NavTestHelper.printPath(pa);
View Full Code Here

            // TODO Auto-generated catch block
            e.printStackTrace();
          }
         
          if(ent != null && destination != null){
                Path pa = new Path();
                PositioningComponent pc = (PositioningComponent) em.getComponent(ent.getId(), PositioningComponent.class);
                if(pc != null){
                boolean foundPath = enm.buildNavigationPath(pa, pc.position, destination);
                if(foundPath){
                  NavTestHelper.printPath(pa);
View Full Code Here

        TiledNavMesh n44 = em.getNavMesh(10,10);
        assertEquals(n11, n44);

        Vector3f sPos = new Vector3f(10,0,10);
        Vector3f ePos = new Vector3f(30,0,30);
        Path p = null;
        p= NavTestHelper.findPath(em, sPos, ePos);
        assertNotNull(p);//path inside tile
        assertTrue(NavTestHelper.areCellsConnected(p));
        sPos = new Vector3f(10,0,-10);
        ePos = new Vector3f(30,0,30);
View Full Code Here

              return;
            } else {//FIXME click on anything, check nav, then send request
              // this is the one
              Vector3f location = res.getContactPoint();
              if(location != null){
                Path p = new Path();
                PositioningComponent pos = (PositioningComponent) sin.getEntityManager().getComponent(handler.getSelectedObjectId(), PositioningComponent.class);
                if(pos != null){
                  if(sin.getNavManager().buildNavigationPath(p, pos.position, location.clone())) {
                    log.fine("new loc:" + location
                        + " sent:"+ ServerValues.getServerCoordX(location.x)
View Full Code Here

      com.position.set(com.goalPos);
      haltPosComponent(com);
      com.cell = -1;
      com.mesh = -1;
      com.teleport = false;
      Path pa = new Path();
      if(Singleton.get().getNavManager().buildNavigationPath(pa, com.position.add(0.01f, 0f, 0f), com.goalPos)){
        com.initByWayPoint(pa);//not really a waypoint but a point quite near our end point
      }
      if(Singleton.get().getEntityManager().isPlayerComponent(com)){
        Singleton.get().getClientFacade().sendValidatePosition(com);
View Full Code Here

                + "," + cZ + " to " + tX + "," + tY + "," + tZ +" but current position is "+pos.position+" goal is "+pos.goalPos+" speed "+(pos.running?pos.runSpeed:pos.walkSpeed));
          }
          pos.goalPos.set(tX,tY,tZ);
          //FIXME this just shifts the position, not good... rework
//          pos.position.set(pos.startPos); 
          Path pa = new Path();
          if(Singleton.get().getNavManager().buildNavigationPath(pa, pos.position, pos.goalPos)){
            pos.initByWayPoint(pa);
          } else {
            log.severe("Failed to place entity start:"+pos.position+" goal:"+pos.goalPos);
          }
View Full Code Here

TOP

Related Classes of com.l2client.navigation.Path$WayPoint

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.