Inviwo  0.9.10.1
Inviwo documentation
inviwo::marching::Config Struct Reference

#include <marchingcubesopt.h>

Public Types

using NodeId = int
 
using EdgeId = int
 
using FaceId = int
 
using Edge = std::array< NodeId, 2 >
 
using Face = std::array< EdgeId, 4 >
 
using Triangle = std::array< EdgeId, 3 >
 

Public Member Functions

std::vector< Triangle > calcTriangles (std::bitset< 8 > corners, bool flip=false)
 
std::vector< EdgeId > calcEdges (std::bitset< 8 > corners, bool flip=false)
 
std::array< size_t, 8 > calcIncrenents (std::bitset< 8 > corners, bool flip=false)
 

Public Attributes

const std::array< size3_t, 8 > vertices
 
const std::array< Edge, 12 > edges
 
const std::array< Face, 6 > faces
 
const std::unordered_map< size_t, std::vector< Triangle > > triangulations
 
const std::array< std::array< EdgeId, 8 >, 8 > nodeIdsToEdgeId
 
const std::array< std::array< FaceId, 2 >, 12 > edgeIdToFaceIds
 
const std::array< std::array< NodeId, 3 >, 8 > nodeNeighbours
 
const std::array< std::vector< Triangle >, 256 > caseTriangles
 
const std::array< std::vector< EdgeId >, 256 > caseEdges
 
const std::array< std::array< size_t, 8 >, 256 > caseIncrements
 

Detailed Description

Cube definitions

                    ●────────── e10  ─────────●
               v7 (0,1,1)                v6 (1,1,1)
                  ╱ │                       ╱ │
                 ╱  │                      ╱  │
                    │                         │
              e11   │                    e9   │

             ╱      e7                 ╱      e6
            ●──────────  e8  ─────────●
       v4 (0,0,1)   │            v5 (1,0,1)   │
            │       │                 │       │
            │       │                 │       │
            │       │                 │       │
            │       ●─────────  e2  ──┼───────●
               v3 (0,1,0)                v2 (1,1,0)
           e4     ╱                  e5     ╱

            │   e3                    │   e1

▲ │ │ │ ▲ │ ╱ │ ╱ Z │ Y ╱ │╱ │╱ │ ╱ ●────────── e0 ─────────● │ ╱ v0 (0,0,0) v1 (1,0,0) │ ╱ │╱ ●──────────▶ X

Caching Edge 0: xCacheCurr0 get 0 ind.x, ind.y 1: yCacheCurr get 4 ind.x + 1, ind.y 2: xCacheCurr1 get 1 ind.x, ind.y + 1 3: yCacheCurr get 4 ind.x, ind.y 4: zCacheCurr get 6 ind.x 5: zCacheCurr get 6 ind.x + 1 6: zCacheNext add 7 ind.x + 1 7: zCacheNext get 7 ind.x 8: xCacheNext0 get 2 ind.x, ind.y 9: yCacheNext add 5 ind.x + 1, ind.y 10: xCacheNext1 add 3 ind.x, ind.y + 1 11: yCacheNext get 5 ind.x, ind.y

{xCacheCurr0, xCacheCurr1, xCacheNext0, xCacheNext1, yCacheCurr, yCacheNext, zCacheCurr, zCacheNext} 0, 4, 1, 4, 6, 6, 7, 7, 2, 5, 3, 5 Triangulations 3 ● 2 3 2 3 2 ╱ ╲ ● ●───────● ●───────● ╱ ╲ ╱ ╲ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╲ ╱ ╲ ╱ ╲ ╱ ╲ 4 ●───────● 2 ╱ ╲ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ╱ ╲ ●───────● ●───────● ●───────●───────● ╱ ╲ ╱ ╲ 0 1 0 1 4 0 1 ╱ ╲ ╱ ╲ ●───────●───────● 5 0 1


The documentation for this struct was generated from the following files: