Iterators

Bresenham’s line drawing algorithm implementation in 2D and 3D dimensions

Лицензия

Лицензия

Группа

Группа

org.jmmo
Идентификатор

Идентификатор

bresenham-line
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Iterators
Bresenham’s line drawing algorithm implementation in 2D and 3D dimensions
Ссылка на сайт

Ссылка на сайт

https://github.com/Megaprog/BresenhamLine
Система контроля версий

Система контроля версий

https://github.com/Megaprog/BresenhamLine

Скачать bresenham-line

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.jmmo/bresenham-line/ -->
<dependency>
    <groupId>org.jmmo</groupId>
    <artifactId>bresenham-line</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.jmmo/bresenham-line/
implementation 'org.jmmo:bresenham-line:1.0'
// https://jarcasting.com/artifacts/org.jmmo/bresenham-line/
implementation ("org.jmmo:bresenham-line:1.0")
'org.jmmo:bresenham-line:jar:1.0'
<dependency org="org.jmmo" name="bresenham-line" rev="1.0">
  <artifact name="bresenham-line" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jmmo', module='bresenham-line', version='1.0')
)
libraryDependencies += "org.jmmo" % "bresenham-line" % "1.0"
[org.jmmo/bresenham-line "1.0"]

Зависимости

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11

Модули Проекта

Данный проект не имеет модулей.

BresenhamLine

Bresenham’s line drawing algorithm implementation in 2D and 3D dimensions.

How to get it?

You can download the latest build at: https://github.com/Megaprog/BresenhamLine/releases

Or use it as a maven dependency:

<dependency>
    <groupId>org.jmmo</groupId>
    <artifactId>bresenham-line</artifactId>
    <version>1.0</version>
</dependency>

How to use it?

import org.jmmo.bresenham_line.BresenhamLine;
import org.jmmo.bresenham_line.PointHandler3D;

public class Example {

    public static void main(String[] args) {
        new BresenhamLine().processLine3D(1, 9, 8, 14, 6, 19, new PointHandler3D<Void>() {
            @Override
            public Void handlePoint(int x, int y, int z) {
                System.out.println("x=" + x + ", y=" + y + ", z=" + z);
                return null;
            }
        });
    }
}

The output is:

x=1, y=9, z=8
x=2, y=9, z=9
x=3, y=9, z=10
x=4, y=8, z=11
x=5, y=8, z=11
x=6, y=8, z=12
x=7, y=8, z=13
x=8, y=7, z=14
x=9, y=7, z=15
x=10, y=7, z=16
x=11, y=7, z=16
x=12, y=6, z=17
x=13, y=6, z=18
x=14, y=6, z=19

Версии библиотеки

Версия
1.0