Skip to content
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

Add material surface mesh reader #1677

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

JacquesOlivierLachaud
Copy link
Member

@JacquesOlivierLachaud JacquesOlivierLachaud commented Jan 4, 2023

PR Description

Add reading material information in OBJ files for SurfaceMeshReader.

Checklist

  • New entry in the ChangeLog.md added.
  • No warning raised in Debug mode.
  • All continuous integration tests pass (Github Actions & appveyor)

@JacquesOlivierLachaud
Copy link
Member Author

I have no idea why the testMeshVoxelization test aborts. It is not related to this PR.

@dcoeurjo
Copy link
Member

dcoeurjo commented Jan 4, 2023

#1674 fixes the python test issues

Copy link
Member

@dcoeurjo dcoeurjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, just few comments.

/// Reads an input file as an OBJ file format and outputs the
/// corresponding surface mesh.
///
/// @param[in,out] input the input stream where the OBJ file is read.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// @param[in,out] input the input stream where the OBJ file is read.
/// @param[in,out] input the input stream from which the OBJ file is read.

?

@@ -89,6 +99,11 @@ readOBJ( std::istream & input, SurfaceMesh & smesh )
} else if ( keyword == "vn" ) {
lineinput >> n[ 0 ] >> n[ 1 ] >> n[ 2 ];
normals.push_back( n );
} else if ( keyword == "usemtl" ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please reformat with the ˋ{`on single lines?

///
/// @param[in,out] input the input stream where the OBJ file is read.
/// @param[out] smesh the output surface mesh.
/// @param[out] materials a vector containing the material of each face (an index).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// @param[out] materials a vector containing the material of each face (an index).
/// @param[out] materials a vector containing the material of each face (an index, may be empty)

If there is no material info, an empty vector is retuned, right ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants