HALFEDGE: optimize buildHeEdgeFromStr
It's faster this way than using buildHeEdge.
This commit is contained in:
parent
4ebd842d2b
commit
c22c00cb2d
@ -191,8 +191,11 @@ buildHeEdge pts fs
|
|||||||
|
|
||||||
-- |Build the HeEdge data structure from the .obj mesh file contents.
|
-- |Build the HeEdge data structure from the .obj mesh file contents.
|
||||||
buildHeEdgeFromStr :: B.ByteString -- ^ contents of an .obj mesh file
|
buildHeEdgeFromStr :: B.ByteString -- ^ contents of an .obj mesh file
|
||||||
-> Maybe (HeEdge PT)
|
-> HeEdge PT
|
||||||
buildHeEdgeFromStr bmesh =
|
buildHeEdgeFromStr bmesh =
|
||||||
let pts = meshVertices bmesh
|
let pts = meshVertices bmesh
|
||||||
fs = meshFaces bmesh
|
faces' = indirectHeFaces . meshFaces $ bmesh
|
||||||
in buildHeEdge pts fs
|
edges = indirectHeEdges faces'
|
||||||
|
verts = indirectHeVerts pts edges
|
||||||
|
in indirectToDirect pts edges faces' verts
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user