I'm working with a mesh which is roughly represented as
{
vertices: [{
x: number,
y: number,
z: number
}, ...],
faces: [{
verticeIndices: [number, number, number]
}, ...]
}
Now given a vertex I'd like to know whether this vertex is surrounded by faces or not. Problem is I don't even know where to start. It seems like it would be something really simple (because when visualising the mesh it's really easy to know whether a vertex is surrounded or not by faces), but I don't know how to express this.
So here's an example picture in 2D:
It's easy to see how the vertices painted in green are not surrounded by faces - And that if we were to connect the two vertices on the bottom left, then the one next to those in the middle would become red.
In this 2D case (probably more simple?) the only way I imagine would be by:
- Finding all of the adjacent faces.
- Find the angle of each face on that vertex.
- If it adds up to 360, then it's all covered, otherwise it's not.
But I think that doesn't really hold up when working in 3D... Is there an easy way of finding out whether a vertex is surrounded or not by faces in 3D?
