/*
    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 {


QGLENGINE_CORE_EXPORT Mesh * plane(float width = 1., float length = 1., int width_segments = 1, int length_segments = 1);

QGLENGINE_CORE_EXPORT Mesh *
cube(float width = 1., float length = 1., float height = 1., int width_segments = 1, int length_segments = 1, int height_segments = 1);

QGLENGINE_CORE_EXPORT Mesh * ellipsoid(int segments_wl, int segments_h, float radius = 1., float end_angle = 360.);

QGLENGINE_CORE_EXPORT Mesh * disc(int segments, float radius = 1., float end_angle = 360.);

QGLENGINE_CORE_EXPORT Mesh * cone(int segments, float radius = 1., float height = 1.);

QGLENGINE_CORE_EXPORT Mesh * cylinder(int segments, float radius = 1., float height = 1., float end_angle = 360.);

QGLENGINE_CORE_EXPORT Mesh * arrow(int segments = 16, float thick = 0.04, float angle = 30.); // length = 1

QGLENGINE_CORE_EXPORT Mesh *
torus(int segments_main = 30, int segments_second = 16, float radius_main = 2.5, float radius_second = 0.5, float end_angle = 360.);


QGLENGINE_CORE_EXPORT Mesh * lineFrame(QVector3D p0, QVector3D p1);

QGLENGINE_CORE_EXPORT Mesh * cubeFrame(float width = 1., float length = 1., float height = 1.);

QGLENGINE_CORE_EXPORT Mesh * ellipsoidFrame(int segments_wl, int segments_h, float radius = 1.);

QGLENGINE_CORE_EXPORT Mesh * coneFrame(int segments, float radius = 1., float height = 1.);

} // namespace Primitive

#endif // GLPRIMITIVE_CUBE_H
