|
TachyonUI 1.1.0
High-performance UI for building tools.
|
A viewport: what it shows and how. Keep it from frame to frame, as a CurveView. More...
#include <gui_controls/gui_viewport_types.h>
Public Attributes | |
| ViewportCamera | camera |
| ViewportTool | tool = ViewportTool::Move |
| bool | showTools = true |
| The tools' buttons down the view's left. | |
| bool | hasSelection = false |
| The selected object, which the gizmo moves; none, no gizmo. | |
| ViewportTransform | selection |
| float | selectionRadius = 1.0f |
| how big it is, for framing it (F) | |
| float | flySpeed = 4.0f |
| How fast W, A, S, D, Q and E move the camera while the right button looks round, in world units a second; the wheel changes it then, and Shift triples it. | |
| color4f | background { 0.07f, 0.08f, 0.09f, 1.0f } |
| Behind what onRender draws; and all there is without it. | |
| std::function< void(const ViewportRenderContext &)> | onRender |
| Records the app's drawing into the view each frame (see ViewportRenderContext). | |
| std::function< void(const ViewportEdit &)> | onEdit |
| A gizmo's drag ended (already applied): put it in the undo history. | |
| std::function< void(const Ray &ray, KeyModifier modifiers)> | onClick |
| A click that didn't drag, off the gizmo: the ray through it, to pick with. | |
Internal: kept between frames while the user works | |
| enum class | CameraMove : uint8_t { None , Pan , Orbit , Look , Dolly } |
| a gizmo part dragged; the selection as it began More... | |
| Gesture< ViewportTransform > | gizmoDrag |
| a gizmo part dragged; the selection as it began | |
| GizmoPart | activePart = GizmoPart::None |
| the part dragged | |
| HoverPart< GizmoPart > | hover |
| the part under the pointer | |
| float2 | dragFrom {} |
| the press, in view pixels | |
| Gesture< ViewportCamera > | cameraDrag |
| the camera moved by a drag; as it was, for Escape | |
| enum tachyon::ViewportView::CameraMove | cameraMove = CameraMove::None |
| a gizmo part dragged; the selection as it began | |
| Gesture | click |
| a left press off the gizmo: a pick if it doesn't move | |
| uint8_t | flyKeys = 0 |
| the fly keys held, by FlyKey bit | |
| bool | flyFast = false |
| Shift held while flying. | |
| IntRect | viewRect {} |
| the view last frame, in screen pixels | |
| uint32_t | revision = 0 |
| a gizmo part dragged; the selection as it began | |
| uint32_t | revisionSeen = 0 |
| a gizmo part dragged; the selection as it began | |
A viewport: what it shows and how. Keep it from frame to frame, as a CurveView.
|
strong |
| ViewportCamera tachyon::ViewportView::camera |
| ViewportTool tachyon::ViewportView::tool = ViewportTool::Move |
| bool tachyon::ViewportView::showTools = true |
The tools' buttons down the view's left.
Off for an app with a toolbar of its own that sets tool (Q, W, E and R still do).
| bool tachyon::ViewportView::hasSelection = false |
The selected object, which the gizmo moves; none, no gizmo.
| ViewportTransform tachyon::ViewportView::selection |
| float tachyon::ViewportView::selectionRadius = 1.0f |
how big it is, for framing it (F)
| float tachyon::ViewportView::flySpeed = 4.0f |
How fast W, A, S, D, Q and E move the camera while the right button looks round, in world units a second; the wheel changes it then, and Shift triples it.
| color4f tachyon::ViewportView::background { 0.07f, 0.08f, 0.09f, 1.0f } |
Behind what onRender draws; and all there is without it.
| std::function<void(const ViewportRenderContext&)> tachyon::ViewportView::onRender |
Records the app's drawing into the view each frame (see ViewportRenderContext).
| std::function<void(const ViewportEdit&)> tachyon::ViewportView::onEdit |
A gizmo's drag ended (already applied): put it in the undo history.
| std::function<void(const Ray& ray, KeyModifier modifiers)> tachyon::ViewportView::onClick |
A click that didn't drag, off the gizmo: the ray through it, to pick with.
| Gesture<ViewportTransform> tachyon::ViewportView::gizmoDrag |
a gizmo part dragged; the selection as it began
| GizmoPart tachyon::ViewportView::activePart = GizmoPart::None |
the part dragged
| float2 tachyon::ViewportView::dragFrom {} |
the press, in view pixels
| Gesture<ViewportCamera> tachyon::ViewportView::cameraDrag |
the camera moved by a drag; as it was, for Escape
| enum tachyon::ViewportView::CameraMove tachyon::ViewportView::cameraMove = CameraMove::None |
a gizmo part dragged; the selection as it began
| Gesture tachyon::ViewportView::click |
a left press off the gizmo: a pick if it doesn't move
| uint8_t tachyon::ViewportView::flyKeys = 0 |
the fly keys held, by FlyKey bit
| bool tachyon::ViewportView::flyFast = false |
Shift held while flying.
| IntRect tachyon::ViewportView::viewRect {} |
the view last frame, in screen pixels
| uint32_t tachyon::ViewportView::revision = 0 |
a gizmo part dragged; the selection as it began
| uint32_t tachyon::ViewportView::revisionSeen = 0 |
a gizmo part dragged; the selection as it began