Skip to content

ui::Vector3

Header: winui/core/Geometry.hpp.

A 3D vector: what an element's translation, scale and center point are. The renderer is 2D, so z is carried and animated but never drawn.

Example:

auto element = std::make_unique<ui::ButtonControl>("Save");
element->set_center_point(ui::Vector3{50, 20, 0});
element->set_scale(ui::Vector3{1.1f, 1.1f, 1.0f});
element->set_translation(element->translation() + ui::Vector3{0, -4, 0});

Field Type Default
x float 0.0f X component (DIPs for a translation/center, a factor for a scale).
y float 0.0f Y component.
z float 0.0f Z component; carried and animated but not rendered.