Visual Computing Library
Loading...
Searching...
No Matches
draw_objects3.h
1/*****************************************************************************
2 * VCLib *
3 * Visual Computing Library *
4 * *
5 * Copyright(C) 2021-2025 *
6 * Visual Computing Lab *
7 * ISTI - Italian National Research Council *
8 * *
9 * All rights reserved. *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the Mozilla Public License Version 2.0 as published *
13 * by the Mozilla Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * Mozilla Public License Version 2.0 *
20 * (https://www.mozilla.org/en-US/MPL/2.0/) for more details. *
21 ****************************************************************************/
22
23#ifndef VCL_OPENGL2_DRAWABLE_DRAW_OBJECTS3_H
24#define VCL_OPENGL2_DRAWABLE_DRAW_OBJECTS3_H
25
26#include <vclib/space/core/color.h>
27
28namespace vcl {
29
30void drawPoint3(const Point3d& p, const Color& c, int size = 8);
31
32void drawSphere(
33 const Point3d& center,
34 float radius,
35 const Color& color,
36 int precision = 4);
37
38void drawCylinder(
39 const Point3d& a,
40 const Point3d& b,
41 float top_radius,
42 float bottom_radius,
43 const Color& color,
44 unsigned int slices = 50,
45 unsigned int stacks = 10);
46
47void drawArrow3(
48 const Point3d& a,
49 const Point3d& b,
50 float bottom_radius,
51 const Color& color,
52 unsigned int slices = 50,
53 unsigned int stacks = 10);
54
55void drawLine3(
56 const Point3d& a,
57 const Point3d& b,
58 const Color& c,
59 int width = 3);
60
61void drawSegment3(
62 const Point3d& a,
63 const Point3d& b,
64 const Color& c,
65 int width = 3);
66
67void drawDashedLine3(
68 const Point3d& a,
69 const Point3d& b,
70 const Color& c,
71 int width = 3);
72
73void drawTriangle(
74 const Point3d& p1,
75 const Point3d& p2,
76 const Point3d& p3,
77 const Color& c,
78 int width = 3,
79 bool fill = false);
80
81void drawQuad3(
82 const Point3d& a,
83 const Point3d& b,
84 const Point3d& c,
85 const Point3d& d,
86 int width = 3);
87
88void drawBox3(
89 const Point3d& min,
90 const Point3d& max,
91 const Color& c,
92 int width = 3);
93
94void drawBox3(
95 const Point3d& p0,
96 const Point3d& p1,
97 const Point3d& p2,
98 const Point3d& p3,
99 const Point3d& p4,
100 const Point3d& p5,
101 const Point3d& p6,
102 const Point3d& p7,
103 const Color& c,
104 int width = 3);
105
106void drawBox3(const std::vector<Point3d>& p, const Color& c, int width = 3);
107
108} // namespace vcl
109
110#endif // VCL_OPENGL2_DRAWABLE_DRAW_OBJECTS3_H
constexpr auto max(const T &p1, const T &p2)
Returns the maximum between the two parameters.
Definition min_max.h:83
constexpr auto min(const T &p1, const T &p2)
Returns the minimum between the two parameters.
Definition min_max.h:42
Point3< double > Point3d
A convenience alias for a 3-dimensional Point with double-precision floating-point components.
Definition point.h:804