Skip to content

Releases: digitalajf/Quadtree

3.27

18 Oct 07:21
5209532
Compare
Choose a tag to compare
  • Quadtree can now compile and run under JDK 16.0.2.

  • Tester.java has been renamed to "ProximityTester.java".

New User Interface

  • Tooltips have been added to a number of ui elements

  • Dark ui elements have been implemented for backgrounds, Buttons and Tooltips

  • UI elements have been organized into labeled groups of JPanels with titled borders

New functionality for ProximityTester.java

  • ProximityTester.java now starts with a square Quadtree shape which is recommended for proper
    proximity test results. AABBs will have consistent proximity test results if the Quadtree shape
    is square regardless of what direction the AABBs are with respect to each other.

  • The user is now able to remove more than just one AABB at a time. It is possible to remove 5, 20 and 100 AABBs at once with an
    adjustment to the "remove_AABB" method which will accept any argument as a parameter.

  • It is now possible to increase or decrease the velocities of AABBs in increments of 10% and 30%. The user may also set all velocities to that of the average.

  • It is now possible to choose different colors for the various elements of the quadtree in ProximityTester.java.

  • Created overloaded grow_AABBs method in ProximityTester.java with a parameter to accept an integer
    as an argument for extra functionality. This method will grow (or shrink) AABBs by an integer value
    in both width and height.

Bug fixes, adjustments and enhancements

See CHANGE_LOG or "Issues" section for a comprehensive view

ver 3.16

18 Jun 02:11
b1aafe1
Compare
Choose a tag to compare

This release adds javadocs to Static-Quadtree.

ver 3.15

18 Dec 21:49
590e644
Compare
Choose a tag to compare

Compiled with JDK 13.0.1

This release fixes one major issue and two minor issues:

  • ver 3.14 and older versions had continuous flickering issues as a result of an overly simplistic graphics painting system. With the introduction of a double buffer painting system, "Tester.java" no longer causes any graphics flickering.

  • An issue has been discovered where the number of AABBs displayed in the title bar maxes out at "32767" even though there may be more than this in the simulation. This issue was due to the variable type being a short integer where the largest possible decimal value is limited to "32767". The issue has been resolved by changing the type from "short" to "int".

  • The window in "Tester.java" is no longer resizable. Resizing the window was a useless action given that the dimensions of the simulator's drawing canvas are not scalable.

ver 3.14

11 Dec 14:58
4b49777
Compare
Choose a tag to compare

Compiled with JDK 13.0.1

This release introduces a number of improvements:

  • Tester.java should no longer flicker too much during the painting of the Quadtree. This has been achieved by setting the frame's "GraphicsConfiguration" to that of the user's monitor.

  • Painting method now shows the deepest quadnode's that intersect at least 2 AABBs in a darker shade of gray.

  • Quadtree.java now behaves precisely with regard to the given maximum tree depth.

  • The "subdivide" method in Quadtree.java has been renamed to "insert" which more accurately describes its function and purpose and is in line with proper naming conventions for a Quadtree's functionality.

  • An extra constructor has been added to AABB.java for convenience: its declaration is like so:
    AABB(int _x1, int _y1, int _x2, int _y2)

  • In Tester.java, all buttons have been placed in the side bar on the right and the menu bar at the top has been removed.

  • Tester.java now has the ability to add "100" AABBs at a time with the addition of a new button.

  • AABBs can now test for collisions between each other through a new collision method. The declaration is like so:
    boolean collides_With(AABB aabb)

Ver 3.12

04 Dec 13:13
4c5265c
Compare
Choose a tag to compare

Compiled with JDK 13.0.1

This release fixes a number of minor issues in multiple areas of functionality:

  • Remaining regular for loops have been converted to advanced for loops where possible:
    for(int i=0; i<abbbs.length; i++) would become for(AABB aabb: aabbs).

  • In ver 3.01 Tester.java would paint quadnodes that contains at least one AABB. Now the paint method for quadnodes paint only the divisions within the quadnode that contain at least 2 AABBs.

  • Added a method to the Quadtree class to rectangulate or square the quadtree. It is was previously done by calling the Constructor with required "square" parameter set to "true" or "false".

  • Converted all required comments to be compatible with Javadoc documentation generator.

  • The "insert" method used in ver 3.01 has been renamed to "subdivide".

ver 3.01

02 Dec 10:51
83db3c0
Compare
Choose a tag to compare

Compiled with JDK 13.0.1

This release introduces a radical redesign of the quadrant subdividing system.

  • The new method eliminates the need to iterate down every level of the quadtree for every AABB. Instead, sub-quadnodes are only searched when at least 2 AABBs exist within the quadnode of focus eliminating needless pursuits down the quadtree. This was made possible by first having all AABBs added to the quadnodes they intersect and then checking to see which quadnode contains at least 2 AABBs.

  • Minor performance tweaks for this revision include converting regular "for loops" i.e.
    for(int i=0; i<aabbs.length; i++) within paint methods into "advanced for loops" i.e.
    for(AABB aabb: aabbs)

ver 2.25

02 Dec 10:12
dd35f95
Compare
Choose a tag to compare

Compiled with JDK 13.0.1

This version presents a static method to create the quadtree.

  • Static building of the quadtree means it is completely built from the tip down to the leaves during initialization. Only simple minimum and maximum querries are made against AABBs to find which (ready made) quadnodes they intersect and to focus on within the sub-quadnodes. This static model eliminates both the real-time creation of Quadnode objects and the calculations needed to identify their vertical/horizontal centers.

  • The Quadtree will look for at least 2 AABBs that share the same leaf quadnode marking each as being in close proximity to the other.

Original

02 Dec 10:07
d377cfc
Compare
Choose a tag to compare
Original Pre-release
Pre-release

My original implementaion of a Java-based Quadtree. This older implementation used Vectors to store objects meant for collision detection as a preliminary "test" version. The quadnodes were created in real-time when at least two objects were found in a single quadrant. This dynamic system of creating sub-quadrants as necessary using Vectors to store objects proved to be inefficient (in Java) and the Quadtree became overwhelmed in little time even when using a small number of moving objects. To determine whether the dynamic nature of the quadtree or the use of Vectors was the culprit (or possibly both) will require further investigation in this branch. My newest version of the Quadtree at this time of writing (11-30-2019) is static and uses LinkedLists to store objects.

A "Sprite" class was used with this earlier version of Quadtree for testing. The Sprite class was simply an AABB with top left and bottom right corners defined by (x1,y1) and (x2,y2). The Sprite also had a boolean determining whether or not it was close to any other Sprites and the ability to paint itself to a "Graphics" object.

The "Main" class is simply a platform to test the Quadtree using a JFrame and JPanel as a drawing canvas. "Main.java" would initialize the Quadtree and a number of Sprites and then go on to loop through the simulation by changing and updating the Sprite locations and the state of the Quadtree and finally rendering the scene in its current state.