Skip to content

Converter

KrystilizeNevaDies edited this page Aug 20, 2021 · 4 revisions

The Converter class is a helper class used to automate converting between arbitrary class you may want to register and our classes.

An example of it's usage:

// Register the Point class to generate a cube
Area3d.CONVERTER.register(Point.class, point ->
    new Area3dRectangularPrism(
            point.x, point.y, 5,
            -point.x, -point.y, -5
    )
);

Point point = new Point(5, 6);


// Create a cube from the converter
Area3d cube = Area3d.CONVERTER.from(point);

Rayfast is a geometry library designed for use in java game servers. It features efficient ray and block casting.

Clone this wiki locally