Skip to content

Mesh

Index · Français

Description

Mesh containing vertices and triangles. Use with Shapes3D and Rasterizer3D.

gaspardos::graphics::Mesh — bindings/cpp/raster3d.hpp, C++98.

Simple program example

#include "raster3d.hpp"
using namespace gaspardos::graphics;

int main()
{
    Mesh value = Shapes3D::cube();
    return value.vertices.empty() ? 1 : 0;
}

Building from Windows

From the repository root, save the program as build/api-examples/Mesh.cpp.

New-Item -ItemType Directory -Force build/api-examples | Out-Null
& .\build-x64-install\bin\x86_64-gaspardos-g++.exe -std=c++98 -O2 -Ibindings/cpp build/api-examples/Mesh.cpp bindings/cpp/raster3d.cpp -o build/api-examples/Mesh.elf
if ($LASTEXITCODE -ne 0) { throw "C++ build failed" }

Executable for GaspardOS. Presentation requires WINDOW_BLIT=146 in the kernel; -38 means the extension is absent. Source files.

Methods and public data

Public fields

vertices : vector; triangles : vector