1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Implemented Area#fromCoordinates

Discussion in 'Client & Site Suggestions' started by Hazard, May 24, 2015.

  1. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    Likes Received:
    84
    Pass a Coordinate[] array to create an Area instance, something similar like Area.Polygonal but then including all the coordinates instead of the edges only(I need this for a dungeoneering script bot)
     
  2. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    Create your own Area class? :p
    iirc it's only like 2 or 3 abstract methods?
     
  3. Viewer

    Viewer Discretion is advised

    Joined:
    Jan 2, 2014
    Messages:
    306
    Likes Received:
    77
    Forgive me if this is bullshit but would your idea be something like this?

    http://pastebin.com/nBshSZQW

    Edit: Yeah I just realized I gave a method a wrong name, (southwestern should be southeastern) but I think it would still work
     
  4. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    Likes Received:
    84
    You seem to understand what I mean, but what in this case: (red = coordinates that shouldn't be included in the area)
    [​IMG]
     
  5. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    There's an isolated green in there?

    Create your class, implement toRectangular by calculating the top right and bottom left coords on construction and creating a Rectangular constant?
    getCoordinates would be just returning the coordinates, which I assume is already a Collection or if not, put them into a collection upon construction
     
  6. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    I'll add this but I need help with the naming.
    Some current thoughts are...
    Area.Predefined
    Area.Arbitrary
    What do you guys think it should be called?
     
  7. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    408
    Likes Received:
    84
    Area.Hazard
    no I'd go for the predefined one
     
  8. Viewer

    Viewer Discretion is advised

    Joined:
    Jan 2, 2014
    Messages:
    306
    Likes Received:
    77
    Area.Fractional or Area.Absolute :p
     
  9. Cloud

    Cloud Engineer

    Joined:
    Jul 28, 2013
    Messages:
    2,777
    Likes Received:
    1,124
    Area.Absolute seems reasonable, any other suggestions or feedback?
     

Share This Page

Loading...