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

Swapped values in returned attribs ? #36

Closed
PeterOGB opened this issue Jan 19, 2020 · 3 comments
Closed

Swapped values in returned attribs ? #36

PeterOGB opened this issue Jan 19, 2020 · 3 comments

Comments

@PeterOGB
Copy link
Contributor

Are the returned values for attrib.num_face_num_verts and attrib.num_faces swapped ?
Loading a simple object that has only a cube and a plane I get
attrib.num_face_num_verts = 14
attrib.num_faces = 42

There are 7 square faces, so 14 triangles, each with 3 vertices, so
attrib.num_face_num_verts = 42
attrib.num_faces = 14
would seem more sensible values.

@syoyo
Copy link
Owner

syoyo commented Jan 20, 2020

Returned value is correct.

attrib.num_faces is actually the array length of vertex indices. 14 triangles * 3 vertex = 42
attrib.num_face_num_verts is the array length of the number of vertices per face(= the number of faces = 14)

Naming of these variables are confusing. I need to find a good naming for it.

#16

@PeterOGB
Copy link
Contributor Author

Either the names need swapping or the values need swapping because at the moment the name and value pairings are very confusing.

@PeterOGB
Copy link
Contributor Author

I've closed this issue because I'm no longer using this library. I've gone back to my own code where at least I understand what the variable names mean.

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

No branches or pull requests

2 participants