Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Implemented Area#fromCoordinates

Joined
Apr 18, 2015
Messages
408
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)
 
Discretion is advised
Joined
Jan 2, 2014
Messages
306
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
 
Joined
Apr 18, 2015
Messages
408
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
You seem to understand what I mean, but what in this case: (red = coordinates that shouldn't be included in the area)
2mg8ck7.png
 
Joined
Dec 10, 2014
Messages
3,255
Create your own Area class? :p
You seem to understand what I mean, but what in this case: (red = coordinates that shouldn't be included in the area)
2mg8ck7.png
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
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
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?
 
Joined
Apr 18, 2015
Messages
408
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?
Area.Hazard
no I'd go for the predefined one
 
Discretion is advised
Joined
Jan 2, 2014
Messages
306
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?

Area.Fractional or Area.Absolute :p
 
Top