| 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_TEXTLABEL3D_H |
| 7 |
#define AVOGADRO_RENDERING_TEXTLABEL3D_H |
| 8 |
|
| 9 |
#include "avogadrorenderingexport.h" |
| 10 |
#include "textlabelbase.h" |
| 11 |
|
| 12 |
namespace Avogadro { |
| 13 |
namespace Rendering { |
| 14 |
|
| 15 |
/** |
| 16 |
* @class TextLabel3D textlabel3d.h <avogadro/rendering/textlabel3d.h> |
| 17 |
* @brief The TextLabel3D class renders billboarded text that is anchored to a |
| 18 |
* point in world coordinates. |
| 19 |
*/ |
| 20 |
class AVOGADRORENDERING_EXPORT TextLabel3D : public TextLabelBase |
| 21 |
{ |
| 22 |
public: |
| 23 |
TextLabel3D(); |
| 24 |
~TextLabel3D() override; |
| 25 |
|
| 26 |
void accept(Visitor&) override; |
| 27 |
|
| 28 |
/** |
| 29 |
* The anchor position in world coordinates. |
| 30 |
* @{ |
| 31 |
*/ |
| 32 |
void setAnchor(const Vector3f& position); |
| 33 |
Vector3f anchor() const; |
| 34 |
/** @} */ |
| 35 |
|
| 36 |
/** |
| 37 |
* The distance to project the label towards the camera from the anchor point. |
| 38 |
* Useful for moving the label on top of, e.g. atom spheres. 0.f by default. |
| 39 |
* @{ |
| 40 |
*/ |
| 41 |
void setRadius(float r); |
| 42 |
float radius() const; |
| 43 |
/** @} */ |
| 44 |
}; |
| 45 |
|
| 46 |
} // namespace Rendering |
| 47 |
} // namespace Avogadro |
| 48 |
|
| 49 |
#endif // AVOGADRO_RENDERING_TEXTLABEL3D_H |