The DJUTILS-DRAW project contains packages for handling points, poly-lines, line-segments, rays, in 2D and 3D. All objects in DJUTILS-DRAW (except the Transformations) are immutable. This is in major contrast to the java.awt.geom package where almost everything is mutable. In DJUTILS-DRAW, all coordinates are internally stored as double values. We do not intend to provide float versions.
DJUTILS-DRAW consists of a number of packages:
Drawableobjects must implement.
Directedis the interface that all
Rayobjects implement; the
Orientedis the interface that all
Transform3dclasses that implement transformations using affine matrices.
Polygonand the Beziér approximators of
Drawable 3D objects implement a
project() method that constructs a corresponding 2D object (where this might fail, the
project() method may throw a
Maven is one of the easiest ways to include DJUTILS-DATA in a Java project. The Maven files for reside at https://djutils.org/maven. When a POM-file is created for the project, the following snippet needs to be included to include DJUTILS-DATA:
<dependencies> <dependency> <groupId>org.djutils</groupId> <artifactId>djutils-draw</artifactId> <version>1.04.12</version> </dependency> ... other dependencies go here ... </dependencies>
Of course, the version number (1.04.12 in the above example) needs to be replaced with the version that one wants to include in the project.
Right now, the DJUTILS-DRAW files are kept on a server at TU Delft, and are not yet made available on Maven Central. Therefore, the repository location has to be specified separately in the Maven POM-file:
<repositories> <repository> <name>djutils Public Repository</name> <id>djutils</id> <url>https://djutils.org/maven</url> </repository> ... other repositories go here ... </repositories>