| 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 |
#ifndef AVOGADRO_RENDERING_ARCSTRIP_H |
| 7 |
#define AVOGADRO_RENDERING_ARCSTRIP_H |
| 8 |
|
| 9 |
#include "linestripgeometry.h" |
| 10 |
|
| 11 |
#include <avogadro/core/array.h> |
| 12 |
|
| 13 |
namespace Avogadro { |
| 14 |
namespace Rendering { |
| 15 |
|
| 16 |
/** |
| 17 |
* @class ArcStrip arcstrip.h |
| 18 |
* <avogadro/rendering/arcstrip.h> |
| 19 |
* @brief The ArcStrip class is a convenience class for creating an arc |
| 20 |
* line (e.g., the edge of a circle). |
| 21 |
*/ |
| 22 |
class AVOGADRORENDERING_EXPORT ArcStrip : public LineStripGeometry |
| 23 |
{ |
| 24 |
public: |
| 25 |
ArcStrip() {} |
| 26 |
~ArcStrip() override {} |
| 27 |
|
| 28 |
/** |
| 29 |
* Define the arc. |
| 30 |
* @param origin Center of the circle from which the arc is cut. |
| 31 |
* @param start A vector pointing from the origin to the start of the arc. |
| 32 |
* @param normal The normal direction to the plane of the circle. |
| 33 |
* @param degreesCCW The extent of the arc, measured counter-clockwise from |
| 34 |
* start in degrees. |
| 35 |
* @param resolutionDeg The radial width of each segment used in the arc |
| 36 |
* approximation, in degrees. This will be adjusted to fit an integral number |
| 37 |
* of segments into the arc. Smaller segments (better approximations) are |
| 38 |
* chosen if adjustment is needed. |
| 39 |
* @param lineWidth The width of the line. |
| 40 |
*/ |
| 41 |
void setArc(const Vector3f& origin, const Vector3f& start, |
| 42 |
const Vector3f& normal, float degreesCCW, float resolutionDeg, |
| 43 |
float lineWidth); |
| 44 |
}; |
| 45 |
|
| 46 |
} // End namespace Rendering |
| 47 |
} // End namespace Avogadro |
| 48 |
|
| 49 |
#endif // AVOGADRO_RENDERING_ARCSTRIP_H |