56 lines
1.8 KiB
C++
56 lines
1.8 KiB
C++
/*
|
|
QGL Primitives
|
|
Ivan Pelipenko peri4ko@yandex.ru
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef GLPRIMITIVE_CUBE_H
|
|
#define GLPRIMITIVE_CUBE_H
|
|
|
|
#include "gltypes.h"
|
|
|
|
|
|
namespace Primitive {
|
|
|
|
|
|
Mesh * plane(float width = 1., float length = 1.);
|
|
|
|
Mesh * cube(float width = 1., float length = 1., float height = 1.);
|
|
|
|
Mesh * ellipsoid(int segments_wl, int segments_h, float radius = 1., float end_angle = 360.);
|
|
|
|
Mesh * disc(int segments, float radius = 1., float end_angle = 360.);
|
|
|
|
Mesh * cone(int segments, float radius = 1., float height = 1.);
|
|
|
|
Mesh * cylinder(int segments, float radius = 1., float height = 1., float end_angle = 360.);
|
|
|
|
Mesh * arrow(int segments = 16, float thick = 0.04, float angle = 30.); // length = 1
|
|
|
|
Mesh * torus(int segments_main = 30, int segments_second = 16, float radius_main = 2.5, float radius_second = 0.5, float end_angle = 360.);
|
|
|
|
|
|
Mesh * lineFrame(QVector3D p0, QVector3D p1);
|
|
|
|
Mesh * cubeFrame(float width = 1., float length = 1., float height = 1.);
|
|
|
|
Mesh * ellipsoidFrame(int segments_wl, int segments_h, float radius = 1.);
|
|
|
|
Mesh * coneFrame(int segments, float radius = 1., float height = 1.);
|
|
|
|
} // namespace Primitive
|
|
|
|
#endif // GLPRIMITIVE_CUBE_H
|