-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Mesh
implementation
#387
Conversation
This is still a draft, but I thought I'd open this already so that you guys can have a peek too and let me know what you think. I'll do a review in a bit to highlight the most "controversial" changes ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work @AlanRynne! Thanks again for implementing this, looks (unsurprisingly) great! :)
Left a couple of comments for review.
/// Returns a normalized copy of this vector. | ||
/// </summary> | ||
/// <returns>A copy of this vector unitized.</returns> | ||
public Vector3 Unit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlanRynne, any reason not to use the existing methods Unitize() CrossProduct() and DotProduct() directly?
namespace GShark.Geometry | ||
{ | ||
/// <summary> | ||
/// Represents a mesh half-edge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edge class representing a mesh half-edge.
/// </summary> | ||
/// <returns>The face area.</returns> | ||
/// <param name="face">Face.</param> | ||
public static double Area(MeshFace face) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a method in Polygon to calculate the area from an arbitrary list of points that form a closed planar boundary. Currently implemented as a getter tho... We could make that a static method and re-use it here for arbitrary NGon area calcs?
What type of PR is this? (check all applicable)
Description
Adds several classes to the
Geometry
namespace to implement a half-edge mesh data-structure.It also adds some initial basic unit tests to ensure everything works as expected.
Related Tickets & Documents
Fixes #225
Added tests?
Added to documentation?