-
Notifications
You must be signed in to change notification settings - Fork 8
Open issues
This is related to pull request #18 (currently blocked until #21 confirms that it works in GWT). The goal is to establish what kind of geometrical utilities we will need, and provide a simple target API.
I propose the following target:
creation and modification of complex 2D shapes during editing
use of complex 2D shapes to filter textures, allowing their use as sprite-masks
collision detection between such shapes in the engine & editor, allowing their use as control-areas
At a low level, boolean shape operations are easy to understand and implement, and provide almost the same degree of fine control as much more complex selection mechanisms. The use of merge() and substract(), plus associated methods to tranfer from the geometry world to libgdx and vice-versa (gdxToJts() and jtsToGdx()), cover creation and modification.
To filter textures, the polygons must be triangulated. Triangulation of non-convex shapes in JTS requires each generated triangle to be queried to check if it is empty space or actual figure. This can be done efficiently for JTS MultiPolygons, which must not overlap. Since MultiPolygons are difficult to manage (boolean operations on them need not return a valid MultiPolygon), both merge() and substract() work on their components: the individual non-overlapping JTS Polygons. Hence the use of ArrayList as an intermediate representation.
Finally, once a list of polygons is collapsed into a MultiPolygon, any point (or similar shape) can be trivially [tested for intersection](http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html#intersects(com.vividsolutions.jts.geom.Geometry\). This allows complex, irregular shapes to be used for control areas.
Please add comments to refine or amend the proposed use-cases / API
eAdventure - eUCM research group
- Setting up a Development Environment
- Contributing Guidelines
- Build Process
- Project structure
- Schema
-
Engine
- Files paths and FileResolver
- Binding Schema elements with Engine elements
- Managing the game view through Layers
- Game loop and scene management
- IO
- File Resolver
- Assets: Converting schema objects to engine objects
- Engine Objects
- Actors
- Effects
- Testing the engine
- Editor
- Remote communication
- Release Process
- Other documentation