OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

Vec2

pub struct Vec2

A point in region coordinates.

Frame-normalized and isotropic: the origin is the frame's top-left and both axes are divided by the frame width. So x runs 0..1 and y runs 0..height / width -- 0.75 on a 4:3 sensor, not 1.0. That is what makes a circle a true circle in pixels at any resolution, and it is the most common thing to get wrong when placing a Region.

Vec2 — fields

x: f32

Horizontal position, 0 at the left edge and 1 at the right.

y: f32

Vertical position, 0 at the top. Its maximum is height / width, not 1.

Vec2 — methods

pub const fn new(x: f32, y: f32) -> Self

A point.