2015-12-08 07:31:57 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2016-07-19 17:35:25 +00:00
|
|
|
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
|
|
|
|
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
2015-12-08 07:31:57 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file ogl_legacy_utils.h
|
|
|
|
* @brief
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OGL_LEGACY_UTILS_H_
|
|
|
|
#define OGL_LEGACY_UTILS_H_
|
|
|
|
|
2021-01-03 22:23:00 +00:00
|
|
|
#include "../3d_render_raytracing/shapes3D/bbox_3d.h"
|
|
|
|
#include "../3d_render_raytracing/shapes2D/round_segment_2d.h"
|
2015-12-08 07:31:57 +00:00
|
|
|
|
|
|
|
/**
|
2021-01-02 21:05:29 +00:00
|
|
|
* Draw a round arrow.
|
|
|
|
*
|
|
|
|
* @param aPosition is the start position of the arrow.
|
|
|
|
* @param aTargetPos is the end position of the arrow.
|
|
|
|
* @param aSize is the diameter of the arrow.
|
2015-12-08 07:31:57 +00:00
|
|
|
*/
|
2021-01-02 21:05:29 +00:00
|
|
|
void DrawRoundArrow( SFVEC3F aPosition, SFVEC3F aTargetPos, float aSize );
|
2015-12-08 07:31:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-01-02 21:05:29 +00:00
|
|
|
* Draw the bounding box lines.
|
|
|
|
*
|
|
|
|
* @param aBBox is the box to draw.
|
2015-12-08 07:31:57 +00:00
|
|
|
*/
|
2021-01-02 21:05:29 +00:00
|
|
|
void DrawBoundingBox( const BBOX_3D& aBBox );
|
2015-12-08 07:31:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-01-02 21:05:29 +00:00
|
|
|
* Draw a half open cylinder with diameter 1.0f and height 1.0f.
|
|
|
|
*
|
|
|
|
* The bottom center is at (0,0,0) and top center is at (0,0,1).
|
|
|
|
*
|
2017-07-03 08:45:56 +00:00
|
|
|
* @param aNrSidesPerCircle is the number of segments to approximate a circle.
|
2015-12-08 07:31:57 +00:00
|
|
|
*/
|
2021-01-02 21:05:29 +00:00
|
|
|
void DrawHalfOpenCylinder( unsigned int aNrSidesPerCircle );
|
2015-12-08 07:31:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2021-01-02 21:05:29 +00:00
|
|
|
* Draw a thick line segment with rounded ends.
|
|
|
|
*
|
2017-07-03 08:45:56 +00:00
|
|
|
* @param aSegment is the thick segment to draw
|
2021-01-02 21:05:29 +00:00
|
|
|
* @param aNrSidesPerCircle is the number of segments to approximate the circle used to draw
|
|
|
|
* the rounded ends of the segment.
|
2015-12-08 07:31:57 +00:00
|
|
|
*/
|
2021-01-02 21:05:29 +00:00
|
|
|
void DrawSegment( const ROUND_SEGMENT_2D& aSegment, unsigned int aNrSidesPerCircle );
|
2015-12-08 07:31:57 +00:00
|
|
|
|
|
|
|
#endif // OGL_LEGACY_UTILS_H_
|