VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
immediate.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4// Created by Arnis Lektauers on 11.10.2025.
5//
6#pragma once
7
8#include <vector>
9
10#include "core/math/color.h"
11#include "core/math/vector3.h"
12#include "core/objectPool.h"
13
14namespace visutwin::canvas
15{
20 {
21 public:
23 {
26 Color color = Color(1.0f, 1.0f, 1.0f, 1.0f);
27 float thickness = 1.0f;
28 };
29
30 // DEVIATION: this C++ port exposes a pooled overlay command API for debug instrumentation workflows.
31 OverlayCommand* addOverlayLine(const Vector3& start, const Vector3& end, const Color& color, float thickness = 1.0f);
32
33 const std::vector<OverlayCommand*>& overlays() const { return _overlayCommands; }
34
35 // Called after the frame was rendered, clears data
36 void onPostRender();
37
38 private:
40 std::vector<OverlayCommand*> _overlayCommands;
41 };
42}
OverlayCommand * addOverlayLine(const Vector3 &start, const Vector3 &end, const Color &color, float thickness=1.0f)
Definition immediate.cpp:10
const std::vector< OverlayCommand * > & overlays() const
Definition immediate.h:33
RGBA color with floating-point components in [0, 1].
Definition color.h:18
3D vector for positions, directions, and normals with multi-backend SIMD acceleration.
Definition vector3.h:29