Skip to content

Create geometry objects from boolean operations.

License

Notifications You must be signed in to change notification settings

erictuvesson/CSG

Repository files navigation

Constructive solid geometry (CSG)

NuGet Badge Codacy Badge

Create geometry objects from boolean operations.

Sample

var shape1 = new Cube(position: new Vector3(0, 0, 0), size: new Vector3(0.50f, 0.50f, 0.50f));
var shape2 = new Cube(position: new Vector3(1, 1, 0), size: new Vector3(0.50f, 0.50f, 0.50f));
var result = shape1.Intersect(shape2);

// result.Vertices => Vertex[];
// result.Indices => ushort[];
// then you have the vertices and indices in result.

Contributing

Contributions are always welcome.

License

The project is available as open source under the terms of the MIT License.