Darker AO for the stone quary
[0ad.git] / source / renderer / DebugRenderer.h
blob40493c0959b1a7b90ca1adce78f5d6ebc7a9610e
1 /* Copyright (C) 2021 Wildfire Games.
2 * This file is part of 0 A.D.
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef INCLUDED_DEBUGRENDERER
19 #define INCLUDED_DEBUGRENDERER
21 #include <vector>
23 class CBoundingBoxAligned;
24 class CBrush;
25 class CCamera;
26 class CMatrix3D;
27 class CVector3D;
29 struct CColor;
31 // Helper for unoptimized rendering of geometrics primitives. Should not be
32 // used for regular passes.
33 class CDebugRenderer
35 public:
36 /**
37 * Render the line in world space.
39 void DrawLine(const CVector3D& from, const CVector3D& to, const CColor& color, const float width);
40 void DrawLine(const std::vector<CVector3D>& line, const CColor& color, const float width);
42 /**
43 * Render the circle in world space oriented to the view camera.
45 void DrawCircle(const CVector3D& origin, const float radius, const CColor& color);
47 /**
48 * Render: Renders the camera's frustum in world space.
50 * @param intermediates determines how many intermediate distance planes should
51 * be hinted at between the near and far planes
53 void DrawCameraFrustum(const CCamera& camera, const CColor& color, int intermediates = 0);
55 /**
56 * Render the surfaces of the bound box as triangles.
58 void DrawBoundingBox(const CBoundingBoxAligned& boundingBox, const CColor& color);
59 void DrawBoundingBox(const CBoundingBoxAligned& boundingBox, const CColor& color, const CMatrix3D& transform);
61 /**
62 * Render the outline of the bound box as lines.
64 void DrawBoundingBoxOutline(const CBoundingBoxAligned& boundingBox, const CColor& color);
65 void DrawBoundingBoxOutline(const CBoundingBoxAligned& boundingBox, const CColor& color, const CMatrix3D& transform);
67 /**
68 * Render the surfaces of the brush as triangles.
70 void DrawBrush(const CBrush& brush, const CColor& color);
72 /**
73 * Render the outline of the brush as lines.
75 void DrawBrushOutline(const CBrush& brush, const CColor& color);
78 #endif // INCLUDED_DEBUGRENDERER