| 1 |
/****************************************************************************** |
| 2 |
This source file is part of the Avogadro project. |
| 3 |
This source code is released under the 3-Clause BSD License, (see "LICENSE"). |
| 4 |
******************************************************************************/ |
| 5 |
|
| 6 |
#include "quadoutline.h" |
| 7 |
|
| 8 |
using Avogadro::Core::Array; |
| 9 |
|
| 10 |
namespace Avogadro::Rendering { |
| 11 |
|
| 12 |
void QuadOutline::setQuad(const Vector3f& topLeft, const Vector3f& topRight, |
| 13 |
const Vector3f& bottomLeft, |
| 14 |
const Vector3f& bottomRight, float lineWidth) |
| 15 |
{ |
| 16 |
Array<Vector3f> verts(5); |
| 17 |
verts[0] = topLeft; |
| 18 |
verts[1] = topRight; |
| 19 |
verts[2] = bottomRight; |
| 20 |
verts[3] = bottomLeft; |
| 21 |
verts[4] = topLeft; |
| 22 |
|
| 23 |
clear(); |
| 24 |
addLineStrip(verts, lineWidth); |
| 25 |
} |
| 26 |
|
| 27 |
} // End namespace Avogadro::Rendering |