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
23 class CBoundingBoxAligned
;
31 // Helper for unoptimized rendering of geometrics primitives. Should not be
32 // used for regular passes.
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
);
43 * Render the circle in world space oriented to the view camera.
45 void DrawCircle(const CVector3D
& origin
, const float radius
, const CColor
& color
);
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);
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
);
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
);
68 * Render the surfaces of the brush as triangles.
70 void DrawBrush(const CBrush
& brush
, const CColor
& color
);
73 * Render the outline of the brush as lines.
75 void DrawBrushOutline(const CBrush
& brush
, const CColor
& color
);
78 #endif // INCLUDED_DEBUGRENDERER