BlobType

Identifies the kind of data stored in a TypedBlob

Identifies the type of data stored in a TypedBlob.

Signature

// Identifies the kind of data stored in a TypedBlob
enum BlobType:
    QueryResult = 100001
    DefectNetwork = 200001
    Triangles = 1001000
    Polygons = 1001001
    IndexedTriangles = 1002000
    IndexedPolygons = 1002001
    HalfedgeExplicit = 1003000
    HalfedgeImplicitOpposite = 1003001
    HalfedgeImplicitNext = 1003002

QueryResult

Due to the asynchronous nature of Operations, the Operation::QueryXYZ cannot return their result immediately. Thus, they are stored in TypedBlobs with BlobType::QueryResult to be retrieved after the Operation was executed. Provides DataSlot::QueryResultXYZ slots. Details are found in the appropriate Operation::QueryXYZ functions.

DefectNetwork

A segment graph that describes where a non-supersolid mesh actually violates the supersolid property. Segments are stored as DataSlot::SegmentsIndexed with indices pointing into DataSlot::PositionsF32. This graph has deduplicated vertices, similar to how Operation::ExportToIndexedTrianglesF32 yields an indexed and topologically connected result. Each segment has an associated positive integer defect stored in DataSlot::Defects.

Triangles

A triangle soup. The exact data slots depend on the export method used.

For example, with Operation::ExportToTrianglesF32 or Operation::ExportMesh with ExportOption::VertexPositionF32, this blob provides DataSlot::TrianglesF32. Provides DataSlot::PrimitiveIDs if exported with primitive tracking, i.e. by Operation::ExportToTrianglesF32WithID, or ExportOption::PrimitiveID.

Polygons

A polygon soup. Unrolled polygons are effectively flat lists of half-edge attributes.

Provides DataSlot::PolygonSize to define how many contiguous attributes belong to the same polygon. For example, with Operation::ExportMesh and ExportOption::VertexPositionF32, this blob also provides DataSlot::PositionsF32. The polygon sizes then dictate which PositionsF32 belong to which polygon (in order).

Note:
depending on the export options, these polygons might not be convex. They will never have holes, though.

IndexedTriangles

A list of triangles with vertex indices.

Provides DataSlot::TrianglesIndexed to index into other attributes.

For example, with Operation::ExportToIndexedTrianglesF32 or Operation::ExportMesh with ExportOption::VertexPositionF32, this blob provides DataSlot::PositionsF32.

IndexedPolygons

A list of polygons with vertex indices.

Provides DataSlot::PolygonSize to define how many contiguous indices belong to the same polygon. The vertex indices themselves are stored in DataSlot::HalfedgeToVertex. These can then used to access vertex attributes. For example, with Operation::ExportMesh and ExportOption::VertexPositionF32, this blob provides DataSlot::PositionsF32.

HalfedgeExplicit

A half-edge data structure with explicit halfedge relations. Provides DataSlot::HalfedgeToVertex, DataSlot::HalfedgeToNextHalfedge, and DataSlot::HalfedgeToOppositeHalfedge. Other half-edge relations can be added via ExportOption.

Note:
as always, vertex attributes are opt-in. For example, with Operation::ExportMesh and ExportOption::VertexPositionF32, this blob provides DataSlot::PositionsF32.

HalfedgeImplicitOpposite

A half-edge data structure with implicit-opposite halfedge relations. Provides DataSlot::HalfedgeToVertex, DataSlot::HalfedgeToNextHalfedge. Other half-edge relations can be added via ExportOption.

"Implicit-opposite" means that halfedges are stored next to their opposite. This effectively means that we're storing edges as (halfedge, opposite halfedge) pairs. "opposite(h)" is a trivial "h ^ 1" (bitwise xor). "edge(h)" is "h >> 1". "halfedges(e)" is "(e * 2 + 0, e * 2 + 1)".

Note:
as always, vertex attributes are opt-in. For example, with Operation::ExportMesh and ExportOption::VertexPositionF32, this blob provides DataSlot::PositionsF32.

HalfedgeImplicitNext

A half-edge data structure with implicit-next halfedge relations. Provides DataSlot::PolygonSize, DataSlot::HalfedgeToVertex, DataSlot::HalfedgeToOppositeHalfedge. Other half-edge relations can be added via ExportOption.

"Implicit-next" means that halfedges belonging to the same polygon are stored contiguously in-order. Given the polygon size "s" and the relative index "i" of the halfedge inside the polygon, the next halfedge is simply "(i + 1) % s" in local terms. For efficient random access, a prefix sum of the polygon sizes is advisable.

Note:
as always, vertex attributes are opt-in. For example, with Operation::ExportMesh and ExportOption::VertexPositionF32, this blob provides DataSlot::PositionsF32.