Replies: 4 comments
-
A triangle mesh is a special case for a polygon mesh which it inherits from reducing code duplication. |
Beta Was this translation helpful? Give feedback.
-
To clarify, I think both @AlexGisi and I are confused about the input structure of the face integers. It seems like the constructor for the polygon mesh currently takes an I think what @AlexGisi is suggesting is that we:
|
Beta Was this translation helpful? Give feedback.
-
I don't have any objections to this.
I would need to verify, but I am almost certain that the data types were specifically used because they are directly compatible with components which consume or produce the object to avoid type conversions. If this is the case, I would be against changing the storage type. |
Beta Was this translation helpful? Give feedback.
-
Sounds good to me too. Could we maybe also derive SDFMesh from TriangleMesh instead of PolygonMesh, as it currently duplicates the check for triangularity?
This type of storage is compatible with PCL: 1) a list of vertices and 2) a polygon list consisting of each time a size (number of vertices of the polygon) followed by the specified number of indices into the vertex list. Not very logical, I agree. I'm not sure if the way it is used currently indeed has efficiency benefits, that should be investigated indeed. Or you could simply add another constructor with the std::vectorEigen::VectorXi datatype and convert. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The mesh constructor takes an integer vector of variable length (
triangles
) to represent the mesh's triangles. The constructor describes this asThe constructor then checks that the mesh is triangular. Combining this with the fact
triangles
is suggestively named, would it be more intuitive and efficient to store thetriangles
in astd::vector<Eigen::3i>>
, analogous to the vertices?Beta Was this translation helpful? Give feedback.
All reactions