MCPcopy Create free account
hub / github.com/colmap/colmap / MakePyramidMesh

Function MakePyramidMesh

src/colmap/mvs/texture_mapping_test.cc:155–171  ·  view source on GitHub ↗

Create a 4-face pyramid mesh.

Source from the content-addressed store, hash-verified

153
154// Create a 4-face pyramid mesh.
155PlyMesh MakePyramidMesh() {
156 PlyMesh mesh;
157 mesh.vertices = {
158 PlyMeshVertex(0.0f, 0.0f, 0.0f),
159 PlyMeshVertex(1.0f, 0.0f, 0.0f),
160 PlyMeshVertex(1.0f, 1.0f, 0.0f),
161 PlyMeshVertex(0.0f, 1.0f, 0.0f),
162 PlyMeshVertex(0.5f, 0.5f, 1.0f),
163 };
164 mesh.faces = {
165 PlyMeshFace(0, 1, 4),
166 PlyMeshFace(1, 2, 4),
167 PlyMeshFace(2, 3, 4),
168 PlyMeshFace(3, 0, 4),
169 };
170 return mesh;
171}
172
173// Create a 12-face cube mesh (2 triangles per face).
174PlyMesh MakeCubeMesh() {

Callers 1

TESTFunction · 0.85

Calls 2

PlyMeshVertexClass · 0.85
PlyMeshFaceClass · 0.85

Tested by

no test coverage detected