< Previous | Contents | Manuals Home | Boris FX | Next >
Edge Accumulator
This object is used for generating the edge list for Maya mesh outputs, which require being able to quickly accumulate and re-find vertex-to-vertex edges. It is created from a specific mesh, but can be repurposed as needed using the Reset() call.
Edges are treated as ordered: if the edge v1,v2 is added, the edge v2,v1 will not be found. This is intentional for flexibility. Rather than adding the edge in both directions, the search should be done in both directions (this will be very quick). For Maya output, this makes sense, as different output must be produced for reversed edges.
.AddEdge(v1,v2) Add an ordered edge from vertex v1 to v2.
.EdgeCount() Current total number of edges added.
.EdgeIndex(v1, veidx) The overall edge index for the veidx’th edge
on vertex v1.
.FindEdge(v1, v2) Return the overall edge index of the ordered edge from v1 to v2, or 0 if it is not found.
.GetEdge(eidx) Returns the list [v1, v2] for the overall edge index eidx’th edge.
.NEdgesOnVertex(v1) The number of edges from vertex v1, which is
the maximum value of veidx for vertex v1.
.Reset(maxNV, estEdges) Resets the edge accumulator, preparing it to
work on maxNV vertices, with an estimate of estEdges edges. The vertex count is a hard limit, but the edge count is an estimate for rough storage allocation only. Existing edge data is deleted.
.SecondVertex(v1, veidx) Return the second vertex (v2) for the veidx’th
edge on vertex v1.
.VertexCount() The number of vertices allowed, based on the mesh that the Edge Accumulator was created from, or a subsequent Reset() call.
©2023 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.