MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / createMesh

Function createMesh

source/MRTestC2/MRMeshComponents.c:22–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20} CreatedMesh;
21
22CreatedMesh createMesh( void )
23{
24 const MR_Vector3f meshASize = MR_Vector3f_diagonal( 1.0f );
25 const MR_Vector3f meshABase = MR_Vector3f_diagonal( -0.5f );
26
27 const MR_Vector3f meshBSize = MR_Vector3f_diagonal( 0.1f );
28 const MR_Vector3f meshBBase = MR_Vector3f_diagonal( 1.0f );
29
30 MR_Mesh* meshA = MR_makeCube( &meshASize, &meshABase );
31 MR_Mesh* meshB = MR_makeCube( &meshBSize, &meshBBase );
32
33 MR_BooleanResult* resultAB = MR_boolean_4_const_MR_Mesh_ref( meshA, meshB, MR_BooleanOperation_Union, NULL );
34 MR_Mesh_Destroy( meshA );
35 MR_Mesh_Destroy( meshB );
36
37 CreatedMesh ret;
38 ret.mesh = MR_Mesh_ConstructFromAnother( MR_PassBy_Copy, MR_BooleanResult_GetMutable_mesh( resultAB ) );
39 MR_BooleanResult_Destroy( resultAB );
40
41 ret.part = MR_MeshPart_Construct( ret.mesh, NULL );
42
43 return ret;
44}
45
46void destroyMesh( CreatedMesh target )
47{

Callers 5

testComponentsMapFunction · 0.85
testLargeRegionsFunction · 0.85
testLargeComponentsFunction · 0.85
testLargestComponentFunction · 0.85
testGetComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected