class Viewport

Defined at line 186 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/cpp/fidl/fuchsia.ui.pointerinjector/cpp/natural_types.h

A rectangular region that directs injected events into a target.

The viewport relates a pointer's position across multiple independent

coordinate systems: the context, the viewport, and the dispatch clients.

Intuitively, the viewport is how a pointer's position is mapped to an

interactive part of the scene.

A matrix is used to relate the viewport coordinate system to the context

coordinate system. A pair of extents defines the viewport's size in the

viewport coordinate system. Together, they define the viewport's placement

in the context coordinate system.

The viewport coordinate system is used to convey a pointer's coordinates in

a scale-invariant way to dispatch clients, so that pointer movement can be

interpreted correctly under effects like magnification. The context defines

the viewport's minimal and maximal extents in the viewport coordinate

system.

- The boundary of the viewport, a rectangle, is axis aligned with the

viewport coordinate system; however it may otherwise be freely positioned

("float") within it: there is translation and scaling, but no rotation.

- Floating gives the injector some choice in how to convey coordinates, such

as in Vulkan NDC, or in display pixel coordinates.

- The viewport rectangle defines a latch region used in dispatch (described

below).

A dispatch client receives a pointer's coordinates in the viewport

coordinate system, along with a matrix to convert coordinates from the

viewport coordinate system to the dispatch client's coordinate system.

All fields required.

TODO(https://fxbug.dev/42162296): Rename Viewport, it is used in Flatland.

Public Methods

void Viewport (Storage_ storage)
void Viewport ()

Defined at line 192 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/cpp/fidl/fuchsia.ui.pointerinjector/cpp/natural_types.h

void Viewport (Viewport && )

Defined at line 193 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/cpp/fidl/fuchsia.ui.pointerinjector/cpp/natural_types.h

void Viewport (const Viewport & other)
Viewport & operator= (Viewport && )

Defined at line 194 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/cpp/fidl/fuchsia.ui.pointerinjector/cpp/natural_types.h

Viewport & operator= (const Viewport & other)
bool operator== (const Viewport & other)
bool operator!= (const Viewport & other)
bool IsEmpty ()
const std::optional< ::std::array< ::std::array<float, 2>, 2>> & extents ()

The viewport's minimal and maximal extents in the viewport coordinate

system.

::std::optional< ::std::array< ::std::array<float, 2>, 2>> & extents ()

The viewport's minimal and maximal extents in the viewport coordinate

system.

Viewport & extents (std::optional< ::std::array< ::std::array<float, 2>, 2>> value)

The viewport's minimal and maximal extents in the viewport coordinate

system.

const std::optional< ::std::array<float, 9>> & viewport_to_context_transform ()

A transformation matrix that describes how to map the viewport

coordinate system to the context coordinate system.

This transform, together with |extents|, defines the viewport's

placement in the context coordinate system.

This transform must be an invertible matrix (i.e., has a non-zero

determinant), which guarantees it describes a bijection between the

viewport coordinate system and the context coordinate system. A

non-invertible matrix is rejected.

::std::optional< ::std::array<float, 9>> & viewport_to_context_transform ()

A transformation matrix that describes how to map the viewport

coordinate system to the context coordinate system.

This transform, together with |extents|, defines the viewport's

placement in the context coordinate system.

This transform must be an invertible matrix (i.e., has a non-zero

determinant), which guarantees it describes a bijection between the

viewport coordinate system and the context coordinate system. A

non-invertible matrix is rejected.

Viewport & viewport_to_context_transform (std::optional< ::std::array<float, 9>> value)

A transformation matrix that describes how to map the viewport

coordinate system to the context coordinate system.

This transform, together with |extents|, defines the viewport's

placement in the context coordinate system.

This transform must be an invertible matrix (i.e., has a non-zero

determinant), which guarantees it describes a bijection between the

viewport coordinate system and the context coordinate system. A

non-invertible matrix is rejected.

void Viewport (::fidl::internal::DefaultConstructPossiblyInvalidObjectTag )

Friends

class MemberVisitor
class NaturalTableCodingTraits