Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How to use MIConvexHull library

$
0
0

I am currently trying to implement convex hull calculation for my project and therefore, I installed the https://www.nuget.org/packages/MIConvexHull/ NuGet package. (This project is a convex hull algorithm and library for 2D, 3D, and higher dimensions.) Here is the link to the github page: https://github.com/DesignEngrLab/MIConvexHull

This is how far I have come and what I have done/understood so far:For creating the convex hull, you need a list of vertices and then a convex hull is basically a list of vertices and a list of faces. So here is how I currently try to implement it.

List<Vertex> MI_convexHullVertices = new List<Vertex>();var MI_convexHull = MIConvexHull.ConvexHull.Create<Vertex, Face>(vertices);

For this code, I get a lot of compiler errors though because there is no Vertex and no Face class. And I now don't know what to use here.

This is a part from the ConvexHull class inside ConvexHull.cs:

    public static ConvexHull<TVertex, TFace> Create<TVertex, TFace>(IList<TVertex> data,        double PlaneDistanceTolerance = Constants.DefaultPlaneDistanceTolerance)        where TVertex : IVertex        where TFace : ConvexFace<TVertex, TFace>, new()    {        return ConvexHull<TVertex, TFace>.Create(data, PlaneDistanceTolerance);    }

And now here comes my question: Can someone explain to me what TVertex and TFace is? And after that, how to use the code?

I feel like it has something to do with generic data types, like TVertex isn't a real type, but what exactly is it and what real class/type can I use to actually implement convex hull calculation?

The thing is, I don't know the syntax at the end there.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>