#include <math.h>
#include <stdio.h>
#define PI 3.14159265358979323846
{
for ( int i = 0; i < 100; ++i )
{
float u = PI*2 * (float)i / ( 100.f - 1.f );
for ( int j = 0; j < 100; ++j )
{
float v = PI * (float)j / ( 100.f - 1.f );
cos( u ) * sin( v ),
sin( u ) * sin( v ),
cos( v )
};
}
}
if ( !vs )
{
fprintf( stderr, "Removing duplicate points failed\n" );
return 1;
}
if ( !triangulated )
{
fprintf( stderr, "Triangulation failed\n" );
return 1;
}
if ( !mesh )
{
return 1;
}
{
return 1;
}
return 0;
}
struct MR_std_optional_MR_Mesh MR_std_optional_MR_Mesh
struct MR_VertCoords MR_VertCoords
struct MR_MeshPart MR_MeshPart
MRC_API MR_BitSet * MR_VertBitSet_MutableUpcastTo_MR_BitSet(MR_VertBitSet *object)
MRC_API void MR_BitSet_resize(MR_BitSet *_this, MR_uint64_t num_bits, const bool *value)
struct MR_std_optional_MR_VertBitSet MR_std_optional_MR_VertBitSet
struct MR_expected_void_std_string MR_expected_void_std_string
struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string
struct MR_PointCloud MR_PointCloud
MRC_API void MR_MeshPart_Destroy(const MR_MeshPart *_this)
MRC_API MR_MeshPart * MR_MeshPart_Construct(const MR_Mesh *m, const MR_FaceBitSet *bs)
MRC_API MR_expected_void_std_string * MR_MeshSave_toAnySupportedFormat_3(const MR_Mesh *mesh, const char *file, const char *file_end, const MR_SaveSettings *settings)
MRC_API MR_BaseShellParameters * MR_OffsetParameters_MutableUpcastTo_MR_BaseShellParameters(MR_OffsetParameters *object)
MRC_API MR_expected_MR_Mesh_std_string * MR_offsetMesh(const MR_MeshPart *mp, float offset, const MR_OffsetParameters *params)
MRC_API void MR_BaseShellParameters_Set_voxelSize(MR_BaseShellParameters *_this, float value)
MRC_API MR_OffsetParameters * MR_OffsetParameters_DefaultConstruct(void)
MRC_API float MR_suggestVoxelSize(const MR_MeshPart *mp, float approxNumVoxels)
struct MR_OffsetParameters MR_OffsetParameters
MRC_API MR_std_optional_MR_Mesh * MR_triangulatePointCloud(const MR_PointCloud *pointCloud, const MR_TriangulationParameters *params, MR_PassBy progressCb_pass_by, MR_std_function_bool_from_float *progressCb)
MRC_API MR_PointCloud * MR_PointCloud_DefaultConstruct(void)
MRC_API void MR_PointCloud_Set_points(MR_PointCloud *_this, MR_PassBy value_pass_by, MR_VertCoords *value)
MRC_API void MR_PointCloud_invalidateCaches(MR_PointCloud *_this)
MRC_API void MR_PointCloud_Destroy(const MR_PointCloud *_this)
MRC_API MR_VertBitSet * MR_PointCloud_GetMutable_validPoints(MR_PointCloud *_this)
MRC_API void MR_PointCloud_Set_validPoints(MR_PointCloud *_this, MR_PassBy value_pass_by, MR_VertBitSet *value)
MRC_API MR_Vector3f * MR_VertCoords_index(MR_VertCoords *_this, MR_VertId i)
MRC_API MR_VertCoords * MR_VertCoords_Construct_1_uint64_t(MR_uint64_t size)
MRC_API void MR_VertCoords_Destroy(const MR_VertCoords *_this)
MRC_API MR_Mesh * MR_expected_MR_Mesh_std_string_GetMutableValue(MR_expected_MR_Mesh_std_string *_this)
MRC_API const MR_std_string * MR_expected_MR_Mesh_std_string_GetError(const MR_expected_MR_Mesh_std_string *_this)
MRC_API void MR_expected_MR_Mesh_std_string_Destroy(const MR_expected_MR_Mesh_std_string *_this)
MRC_API const MR_std_string * MR_expected_void_std_string_GetError(const MR_expected_void_std_string *_this)
MRC_API void MR_expected_void_std_string_Destroy(const MR_expected_void_std_string *_this)
MRC_API void MR_std_optional_MR_Mesh_Destroy(const MR_std_optional_MR_Mesh *_this)
MRC_API MR_Mesh * MR_std_optional_MR_Mesh_MutableValue(MR_std_optional_MR_Mesh *_this)
MRC_API MR_VertBitSet * MR_std_optional_MR_VertBitSet_MutableValue(MR_std_optional_MR_VertBitSet *_this)
MRC_API void MR_std_optional_MR_VertBitSet_Destroy(const MR_std_optional_MR_VertBitSet *_this)
MRC_API const char * MR_std_string_Data(const MR_std_string *_this)