v0.3.0 API Reference
GatherOutput.h
1//
2// GatherOutput.h
3// avara3d
4//
5// Created by Morgan Davis on 1/3/26.
6// Copyright © 2026 Morgan K Davis. All rights reserved.
7//
8
9#ifndef AVARA3D_RENDER_GATHEROUTPUT_H
10#define AVARA3D_RENDER_GATHEROUTPUT_H
11
12#include <memory>
13#include <optional>
14#include <vector>
15
16#include "a3d/Math.h"
17#include "a3d/mesh/AABB.h"
18#include "a3d/mesh/Line.h"
19#include "a3d/visual/Ground.h"
20
21namespace a3d {
22
23class Line;
24class Material;
25class Mesh;
26class MeshElement;
27class Node;
28class PhysicsWorld;
29class Scene;
30
31// [Internal Types]
32
33enum class RenderStyle : uint8_t {
34 Normal,
35 Wireframe,
36 WireframeOverlay
37};
38
39struct RenderItem {
40 Mesh* mesh = nullptr; //probably remove after handle conversion
41 VertexLayout layout = VertexLayout::None;
42 uint32_t elementIndex = 0;
43 MeshElement* element = nullptr; // TODO: remove
44 Material* material = nullptr;
45 math::vec4 tint = math::vec4(0.0f); // RGB color, a blend strength
46 RenderStyle style = RenderStyle::Normal;
47 math::mat4 model = math::mat4(1.0f);
48 AABB aabb = AABB::Zero(); // world space
49 float depth = 0.0f; // view-space depth for later
50 int renderOrder = 0;
51 bool transparent = false; // for later -- always false in BlendFunction
52};
53
54struct GatherOutput {
55 std::vector<RenderItem> renderItems = {};
56 const Scene* scene = nullptr; // debug AABB
57 std::shared_ptr<Material> backgroundMaterial = nullptr;
58 math::quat backgroundOrientation = math::quat(1.0f);
59 std::optional<Ground> ground = {};
60 std::vector<Node*> lightNodes = {};
61 std::vector<Line> debugLines = {};
62};
63
64} // namespace a3d
65
66#endif // AVARA3D_RENDER_GATHEROUTPUT_H
static AABB Zero()
Returns a zero-size box at the origin.