MCPcopy Create free account
hub / github.com/JeanPhilippeKernel/RendererEngine / CreateCube

Method CreateCube

ZEngine/src/MeshBuilder.cpp:311–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309 }
310
311 Mesh* MeshBuilder::CreateCube(const Vector2& position, const Vector3& size, float angle, const Vector3& axis) {
312 Mesh* mesh = new Mesh{};
313 CubeGeometry* quad_geometry = new CubeGeometry({position.x, position.y, 0.0f}, size, axis, angle);
314 Texture* texture = CreateTexture(1, 1);
315 StandardMaterial* material = new StandardMaterial{};
316
317 material->SetTexture(texture);
318 mesh->SetGeometry(quad_geometry);
319 mesh->SetMaterial(material);
320 return mesh;
321 }
322
323 Mesh* MeshBuilder::CreateCube(const Vector2& position, const Vector3& size, const Vector3& color, float angle, const Vector3& axis) {
324 Mesh* mesh = CreateCube(position, size, angle, axis);

Callers

nothing calls this directly

Calls 5

CreateTextureFunction · 0.85
SetGeometryMethod · 0.80
SetMaterialMethod · 0.80
SetTextureMethod · 0.45
SetDataMethod · 0.45

Tested by

no test coverage detected