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

Function main

tutorials/HelloWorld/HelloWorld.cpp:57–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 }
56
57McInt32 main()
58{
59 //
60 // Create meshes to intersect
61 //
62
63 // the source-mesh (a cube)
64
65 McFloat srcMeshVertices[] = {
66 -5, -5, 5, // vertex 0
67 5, -5, 5, // vertex 1
68 5, 5, 5, // vertex 2
69 -5, 5, 5, // vertex 3
70 -5, -5, -5, // vertex 4
71 5, -5, -5, // vertex 5
72 5, 5, -5, // vertex 6
73 -5, 5, -5 // vertex 7
74 };
75
76 McUint32 srcMeshFaces[] = {
77 0, 1, 2, 3, // face 0
78 7, 6, 5, 4, // face 1
79 1, 5, 6, 2, // face 2
80 0, 3, 7, 4, // face 3
81 3, 2, 6, 7, // face 4
82 4, 5, 1, 0 // face 5
83 };
84
85 McUint32 srcMeshFaceSizes[] = { 4, 4, 4, 4, 4, 4};
86
87 McUint32 srcMeshVertexCount = 8;
88 McUint32 srcMeshFaceCount = 6;
89
90 // the cut mesh (a quad formed of two triangles)
91
92 McFloat cutMeshVertices[] = {
93 -20, -4, 0, // vertex 0
94 0, 20, 20, // vertex 1
95 20, -4, 0, // vertex 2
96 0, 20, -20 // vertex 3
97 };
98
99 McUint32 cutMeshFaces[] = {
100 0, 1, 2, // face 0
101 0, 2, 3 // face 1
102 };
103
104 // McUint32 cutMeshFaceSizes[] = { 3, 3};
105
106 McUint32 cutMeshVertexCount = 4;
107 McUint32 cutMeshFaceCount = 2;
108
109 //
110 // create a context
111 //
112
113 McContext context = MC_NULL_HANDLE;
114 McResult status = mcCreateContext(&context, MC_NULL_HANDLE);

Callers

nothing calls this directly

Calls 6

mcCreateContextFunction · 0.85
mcDispatchFunction · 0.85
mcGetConnectedComponentsFunction · 0.85
mcReleaseContextFunction · 0.85

Tested by

no test coverage detected