pub struct Metrics {
pub scale_x: f32,
pub scale_y: f32,
pub scale_z: f32,
}
Expand description
Rendering target metrics associated with a node.
See also MetricsEvent
.
Fields§
§scale_x: f32
The ratio between the size of one logical pixel within the node’s local coordinate system and the size of one physical pixel of the rendering target.
This scale factors change in relation to the resolution of the rendering target and the scale transformations applied by containing nodes. They are always strictly positive and non-zero.
For example, suppose the rendering target is a high resolution display with a device pixel ratio of 2.0 meaning that each logical pixel within the model corresponds to two physical pixels of the display. Assuming no scale transformations affect the node, then its metrics event will report a scale factor of 2.0.
Building on this example, if instead the node’s parent applies a scale transformation of 0.25 to the node, then the node’s metrics event will report a scale factor of 0.5 indicating that the node should render its content at a reduced resolution and level of detail since a smaller area of physical pixels (half the size in each dimension) will be rendered.
scale_y: f32
§scale_z: f32
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Metrics, D> for Metrics
impl<D: ResourceDialect> Decode<Metrics, D> for Metrics
Source§impl<D: ResourceDialect, T0: Encode<f32, D>, T1: Encode<f32, D>, T2: Encode<f32, D>> Encode<Metrics, D> for (T0, T1, T2)
impl<D: ResourceDialect, T0: Encode<f32, D>, T1: Encode<f32, D>, T2: Encode<f32, D>> Encode<Metrics, D> for (T0, T1, T2)
Source§impl PartialOrd for Metrics
impl PartialOrd for Metrics
Source§impl TypeMarker for Metrics
impl TypeMarker for Metrics
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for Metrics
impl ValueTypeMarker for Metrics
impl Copy for Metrics
impl Persistable for Metrics
impl StructuralPartialEq for Metrics
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)