Menu

line obstacle

2007-02-12
2013-04-30
  • Gabriele Betti

    Gabriele Betti - 2007-02-12

    Anyone sharing a line obstacle class ?
    I need it for 2d hulls .
    I get little confused , if anyone helping better :)
    Gab-

     
    • Craig Reynolds

      Craig Reynolds - 2007-02-12

      [sean-hammond: sorry I forgot to reply to your post, will get to it soonish]

      Gab: I assume you are talking about 2d applications?  In 3d a line obstacle is not very useful, it would be like a wire in space, a cylinder would be more useful.  (Of course, OpenSteer does not yet provide a cylinder obstacle either!  See an old To Do list here: http://sourceforge.net/forum/message.php?msg_id=2839263 )

      If you want a "line" obstacle in the 2d (XZ) plane you can use a RectangleObstacle whose "forward" direction (the normal to the plane of the rectangle) is in the 2d XZ plane.  There is almost an example of this in the Pedestrians plugin in the SVN repository (that is, NOT in release 0.8.2, see http://opensteer.svn.sourceforge.net/viewvc/opensteer/trunk/plugins/Pedestrian.cpp?revision=181&view=markup ):

      ...
          RectangleObstacle gObstacle3 (7,7);
      ...
          gObstacle3.setForward (Vec3(1,1,0).normalize()); // tilted 45 degrees
          gObstacle3.setSide (0,0,1);
          gObstacle3.setUp (Vec3(-1,1,0).normalize()); // tilted 45 degrees
          gObstacle3.setPosition (20, 0, h);
      ...
          gObstacle3.setSeenFrom (Obstacle::both);

       
      • Craig Reynolds

        Craig Reynolds - 2007-02-13

        For the record, I opened a bug on these issues:

        [ 1658493 ] unimplemented basic obstacle shapes, unify shape code
        https://sourceforge.net/tracker/index.php?func=detail&aid=1658493&group_id=77546&atid=550583

        Originally I tried keeping track of these issues in the doc.  But that does not get updated often enough, and the SourceForge "trackers" are a better tool anyway. I hope that using bug trackers will make sure that eventually these issues will be addressed.

         
      • Usher

        Usher - 2007-02-13

        Craig,

        In the current version (0.8.2) of the code there is only a spherical obstacle. Why was some of the code in Obstacle files removed for the 0.8.2 version?

        Thanks.
        john

         
        • Craig Reynolds

          Craig Reynolds - 2007-02-13

          Nothing was removed.  The extensions to the Obstacle classes were made just after the 0.8.2 release (November versus October of 2004).  The only problem is that it has been far too long since the last release.  Until this is rectified by a new release, the best choice is to use the development branch as defined by the SVN repository.

           
    • Gabriele Betti

      Gabriele Betti - 2007-02-12

      Thanks Craig,
      that is exactly what I was after right now ;)

       

Log in to post a comment.