Skip to content

T-Junction solution #13

@TomWor

Description

@TomWor

Hi @fogleman
I'm trying to wrap my head around your voxel optimization and triangulation code and can't seem to find the part that you referenced in your medium article:

"Each rectangular face starts with four edges. These edges are first segmented where T-junctions occur. We still have a quad, but these points indicate where we need the triangle vertices to be when we triangulate the quad. I use a recursive solution, repeatedly splitting the polygon into two polygons."

I was looking for recursion along these lines but can't find it:

fauxgl/voxel.go

Line 193 in 265867c

func triangulateVoxelFaces(plane voxelPlane, faces []voxelFace) []*Triangle {

Could you point me to the part where you split the polygons?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions