KiCad PCB EDA Suite
|
#include "../../common_ogl/openGL_includes.h"
#include "opengl_utils.h"
#include <trigo.h>
#include <wx/debug.h>
Go to the source code of this file.
Macros | |
#define | RADPERDEG 0.0174533f |
Functions | |
void | DrawRoundArrow (SFVEC3F aPosition, SFVEC3F aTargetPos, float aSize) |
Draw a round arrow. | |
void | DrawBoundingBox (const BBOX_3D &aBBox) |
Draw the bounding box lines. | |
void | DrawHalfOpenCylinder (unsigned int aNrSidesPerCircle) |
Draw a half open cylinder with diameter 1.0f and height 1.0f. | |
void | DrawSegment (const ROUND_SEGMENT_2D &aSegment, unsigned int aNrSidesPerCircle) |
Draw a thick line segment with rounded ends. | |
#define RADPERDEG 0.0174533f |
Definition at line 30 of file opengl_utils.cpp.
void DrawBoundingBox | ( | const BBOX_3D & | aBBox | ) |
Draw the bounding box lines.
aBBox | is the box to draw. |
Definition at line 102 of file opengl_utils.cpp.
References BBOX_3D::IsInitialized(), BBOX_3D::Max(), and BBOX_3D::Min().
void DrawHalfOpenCylinder | ( | unsigned int | aNrSidesPerCircle | ) |
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).
aNrSidesPerCircle | is the number of segments to approximate a circle. |
Definition at line 142 of file opengl_utils.cpp.
References ANGLE_0, ANGLE_180, ANGLE_360, delta, and RotatePoint().
Referenced by DrawSegment().
Draw a round arrow.
aPosition | is the start position of the arrow. |
aTargetPos | is the end position of the arrow. |
aSize | is the diameter of the arrow. |
Definition at line 32 of file opengl_utils.cpp.
References RADPERDEG.
Referenced by EDA_3D_MODEL_VIEWER::OnPaint(), and RENDER_3D_OPENGL::render3dArrows().
void DrawSegment | ( | const ROUND_SEGMENT_2D & | aSegment, |
unsigned int | aNrSidesPerCircle | ||
) |
Draw a thick line segment with rounded ends.
aSegment | is the thick segment to draw |
aNrSidesPerCircle | is the number of segments to approximate the circle used to draw the rounded ends of the segment. |
Definition at line 202 of file opengl_utils.cpp.
References DrawHalfOpenCylinder(), ROUND_SEGMENT_2D::GetEnd_minus_Start(), ROUND_SEGMENT_2D::GetLength(), ROUND_SEGMENT_2D::GetRadius(), ROUND_SEGMENT_2D::GetStart(), ROUND_SEGMENT_2D::GetWidth(), and RADPERDEG.