JirkaDellOro / FUDGE

Furtwangen University Didactic Game Editor
https://jirkadelloro.github.io/FUDGE
MIT License
33 stars 27 forks source link

MeshSphere contains unused vertices #402

Open plojo opened 1 year ago

plojo commented 1 year ago

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

JirkaDellOro commented 1 year ago

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

plojo commented 1 year ago

These lines in RenderMesh.ts suggest that this was at least known at some point: https://github.com/JirkaDellOro/FUDGE/blob/ba34c273eae532d9ce0d66b95a90d0b99c1205cd/Core/Source/Render/RenderMesh.ts#L100-L102

JirkaDellOro commented 1 year ago

The problem, but the intention?