Implemented Area#fromCoordinates

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

  1. Hazard

    Joined:
    Apr 18, 2015
    Messages:
    394
    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

    SlashnHax The Chosen One

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

    Viewer Useless

    Joined:
    Jan 2, 2014
    Messages:
    301
    Likes Received:
    70
    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:
    394
    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

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,794
    Likes Received:
    742
    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 The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,310
    Likes Received:
    739
    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:
    394
    Likes Received:
    84
    Area.Hazard
    no I'd go for the predefined one
     
  8. Viewer

    Viewer Useless

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

    Cloud The Developer

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

Share This Page

Loading...