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

MeshSphere contains unused vertices #402

Open
plojo opened this issue Oct 24, 2023 · 3 comments
Open

MeshSphere contains unused vertices #402

plojo opened this issue Oct 24, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@plojo
Copy link
Collaborator

plojo commented Oct 24, 2023

When inspecting a MeshSphere, the first and last vertex never get referenced by any face. Is this intended?

Simple MeshSphere:

latitudes: 2
longitudes: 3

Faces (vertex indices):
0: [1, 4, 3]
1: [1, 2, 4]
2: [4, 7, 6]
3: [4, 5, 7]
4: [7, 10, 9]
5: [7, 8, 10]

Vertices (positions):
0: [0, 0.5, 0]
1: [0.5, 0, 0]
2: [0, -0.5, 0]
3: referTo 0
4: [-0.25, 0, -0.4330126941204071]
5: referTo 2
6: referTo 0
7: [-0.2499999850988388, 0, 0.4330126941204071]
8: referTo 2
9: referTo 0
10: referTo 1
11: referTo 2

@plojo plojo added the bug Something isn't working label Oct 24, 2023
@JirkaDellOro
Copy link
Owner

I can't remember an intention behind this, suspect a bug...

@plojo
Copy link
Collaborator Author

plojo commented Oct 24, 2023

These lines in RenderMesh.ts suggest that this was at least known at some point:

// some vertices might be unused and yield a zero-normal...
if (_vertex.normal.magnitudeSquared > 0)
_vertex.normal.normalize();

@JirkaDellOro
Copy link
Owner

The problem, but the intention?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants