Basic geometry data structures and services.

Points and Lines

The very basics of geometry needs, for two and three-dimensional space.

Boxes and detection collision

Boxes module introduces Bounding boxes for Points and Lines and services to detect collision or inclusion between boxes. It means a simple and fast way to test collision but not really accurate since it uses bounding boxes.

Quadtrees

A QuadTree is a tree data structure in which each internal node has exactly four children They're most often used to partition two-dimensional space by recursively subdividing it into four quadrants or regions.

  • They decompose space into adaptable cells
  • Each cell has a maximum capacity. When maximum is reached, the cell splits.

Quadtrees are using Boxed objects to determine their distribution in the 2D space.

This API provides two different types of Quadtree : Static and Dynamic (respectively SQuadTree and DQuadTree).

  • Static: When you create the QuadTree, you need to specify the region that it will cover

  • Dynamic: You just need to fill the quadtree with objects, and when the threshold is reached, it will automatically divide the current region, depending on the distribution of objects already in the region.

Polygons

Some basic polygon services.

This module contains interesting algorithms for ConvexPolygononly at the moment. A Convex polygon can be defined as follow :

  • All its interior angles are less than 180°. this means that all the vertices of the polygon will point outwards, away from the interior of the shape.

  • Every point on every line segment between two points inside or on the boundary of the polygon remains inside or on the boundary.

  • The polygon is entirely contained in a closed half-plane defined by each of its edges.

  • For each edge, the interior points are all on the same side of the line that the edge defines.

  • The angle at each vertex contains all other vertices in its edges and interior.

A polygon which is not convex is called concave. Convex polygon are used because most geometric problems are simpler and faster on convex objects than on non-convex ones.

Services provided :

  • Point in convex polygon
  • Intersection of convex polygon
  • Convex hull of a set of points
  • Triangulation of polygon

All subgroups and modules

module angles

geometry :: angles

Angle related service using Float to represent an angle in radians
module boxes

geometry :: boxes

Provides interfaces and classes to represent basic geometry needs.
module geometry

geometry :: geometry

Provides interfaces and classes to represent basic geometry needs.
module points_and_lines

geometry :: points_and_lines

Interfaces and classes to represent basic geometry needs.
module polygon

geometry :: polygon

Convex Polygons manipulations
module quadtree

geometry :: quadtree

QuadTree API mostly used for 2 dimensional collision detection
package_diagram geometry\> geometry serialization serialization geometry\>->serialization pipeline pipeline geometry\>->pipeline poset poset serialization->poset meta meta serialization->meta json json serialization->json core core pipeline->core ...poset ... ...poset->poset ...meta ... ...meta->meta ...json ... ...json->json ...core ... ...core->core gamnit gamnit gamnit->geometry\> android android android->gamnit android... ... android...->android

Ancestors

group codecs

core > codecs

Group module for all codec-related manipulations
group collection

core > collection

This module define several collection classes.
group core

core

Nit common library of core classes and methods
group meta

meta

Simple user-defined meta-level to manipulate types of instances as object.
group poset

poset

Pre order sets and partial order set (ie hierarchies)
group text

core > text

All the classes and methods related to the manipulation of text entities

Parents

group pipeline

pipeline

Pipelined filters and operations on iterators.
group serialization

serialization

Abstract serialization services

Children

group gamnit

gamnit

Portable game and multimedia framework for Nit

Descendants

group android

android

Android platform support and APIs
group bundle

android > bundle

A mapping class of String to various value types used by the
group depth

gamnit > depth

gamnit depth, a framework to create portable 3D games in Nit.
group egl

egl

Interface between rendering APIs (OpenGL, OpenGL ES, etc.) and the native windowing system.
group examples

app > examples

group flat

gamnit > flat

Simple API for 2D games, built around Sprite and App::update
group glesv2

glesv2

OpenGL graphics rendering library for embedded systems, version 2.0
group intent

android > intent

Services allowing to launch activities and start/stop services using
group notification

android > notification

Services to show notification in the Android status bar
group service

android > service

Android service support for app.nit centered around the class Service
group shared_preferences

android > shared_preferences

Services allowing to save and load datas to internal android device
group src

android > examples > src

group ui

android > ui

Views and services to use the Android native user interface
group virtual_gamepad

gamnit > virtual_gamepad

Virtual gamepad mapped to keyboard keys for quick and dirty mobile support