#include <MRRenderNameObject.h>
◆ RenderNameObject()
MR::RenderNameObject::RenderNameObject |
( |
const VisualObject & | object | ) |
|
|
inline |
◆ getObjectNameString()
virtual MRVIEWER_API std::string MR::RenderNameObject::getObjectNameString |
( |
const VisualObject & | object, |
|
|
ViewportId | viewportId ) const |
|
virtual |
◆ renderUi()
MRVIEWER_API void MR::RenderNameObject::renderUi |
( |
const UiRenderParams & | params | ) |
|
|
overridevirtual |
Render the UI. This is repeated for each viewport. Here you can either render immediately, or insert a task into params.tasks
, which get Z-sorted.
params
will remain alive as long as the tasks are used.
- You'll have at most one living task at a time, so you can write a non-owning pointer to an internal task.
Reimplemented from MR::IRenderObject.
◆ nameUiLocalOffset
Vector3f MR::RenderNameObject::nameUiLocalOffset |
Which way the name is moved relative to the point
, in model space. The length is respected.
◆ nameUiPoint
Vector3f MR::RenderNameObject::nameUiPoint |
The line attachment point in model space.
◆ nameUiRotateLocalOffset90Degrees
bool MR::RenderNameObject::nameUiRotateLocalOffset90Degrees = false |
If true, the localOffset
is rotated 90 degrees CW after projecting it to screen space. This is great if you have some axis or line that you don't want the name to overlap.
◆ nameUiRotateToScreenPlaneAroundSphereCenter
std::optional<Vector3f> MR::RenderNameObject::nameUiRotateToScreenPlaneAroundSphereCenter |
If set, the vector from this point to point
is rotated to be in the screen plane. localOffset
is also rotated by the same amount. Good for having the name on a spherical surface.
◆ nameUiScreenOffset
Vector2f MR::RenderNameObject::nameUiScreenOffset |
Which way the name is moved relative to the point
, in screen space (Y is down). The length is respected. This is automatically multiplied by the global GUI scale.
The documentation for this class was generated from the following file: