MCPcopy Create free account
hub / github.com/cutdigital/mcut / main

Function main

tutorials/InOutQuery/InOutQuery.cpp:67–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 const void* userParam);
66
67int main()
68{
69 MioMesh srcMesh = {
70 nullptr, // pVertices
71 nullptr, // pNormals
72 nullptr, // pTexCoords
73 nullptr, // pFaceSizes
74 nullptr, // pFaceVertexIndices
75 nullptr, // pFaceVertexTexCoordIndices
76 nullptr, // pFaceVertexNormalIndices
77 0, // numVertices
78 0, // numNormals
79 0, // numTexCoords
80 0, // numFaces
81 };
82
83 MioMesh cutMesh = srcMesh;
84
85 //
86 // read-in the source-mesh from file
87 //
88
89 mioReadOFF(DATA_DIR "/cube.off",
90 &srcMesh.pVertices,
91 &srcMesh.pFaceVertexIndices,
92 &srcMesh.pFaceSizes,
93 &srcMesh.numVertices,
94 &srcMesh.numFaces);
95
96 //
97 // read-in the cut-mesh from file
98 // NOTE: the icosphere (cut-mesh) provided lies inside the cube (source-mesh)
99 //
100
101 mioReadOFF(DATA_DIR "/icosphere.off",
102 &cutMesh.pVertices,
103 &cutMesh.pFaceVertexIndices,
104 &cutMesh.pFaceSizes,
105 &cutMesh.numVertices,
106 &cutMesh.numFaces);
107
108 McContext context = MC_NULL_HANDLE;
109
110 McResult status = mcCreateContextWithHelpers(&context, MC_DEBUG, 2);
111
112 if (status != MC_NO_ERROR) {
113 printf("mcCreateContext failed (err=%d)", (int)status);
114 exit(1);
115 }
116
117 //
118 // config debug output (optional)
119 //
120
121 McFlags contextFlags = MC_NULL_HANDLE;
122
123 status = mcGetInfo(context, MC_CONTEXT_FLAGS, sizeof(McFlags), &contextFlags, nullptr);
124

Callers

nothing calls this directly

Calls 7

mcGetInfoFunction · 0.85
mcDebugMessageCallbackFunction · 0.85
mcDebugMessageControlFunction · 0.85
mcDispatchFunction · 0.85
mcGetConnectedComponentsFunction · 0.85
mcReleaseContextFunction · 0.85

Tested by

no test coverage detected