Skip to content

Vertex really need to be a double[]? #35

@haruby511

Description

@haruby511

As you know, most of 3D applications in C# are using struct for Vertex or Vector. Because it does not generate garbage at all in most cases.

However, In this situation, cannot access the member X, Y, Z with byte offset. Such as 0 for X, 1 for Y etc. If really need to access the member by index and must avoid switch, use array instead even though it will be a garbage.

I wonder that, the MIConvexHull really need array for the vertex?

I can see the IVertex interface. It should work as reference and a struct will be boxed which has implemented the interface.
But, should avoid boxing/unboxing as well in performance critical situation.

I suggest that adding a struct Vertex the MIConvexHull own, or use a single double collection for whole vertices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions