build/api-examples/Shapes3D.cpp¶
Complete program from the Shapes3D API reference. Save it at the path shown above and use the build command in the reference page.
Source files · Download Shapes3D.cpp
#include "raster3d.hpp"
int main()
{
gaspardos::graphics::Mesh cube = gaspardos::graphics::Shapes3D::cube(2);
return cube.vertices.size() == 8 && cube.triangles.size() == 12 ? 0 : 1;
}