Struct nannou_laser::point::RawPoint
source · #[repr(C)]pub struct RawPoint {
pub position: Position,
pub color: Rgb,
}
Expand description
The Point type used for describing raw laser streams.
The point represents the location to which the scanner should point and the colour that the scanner should be at this point.
If two consecutive points have two different colours, the color
values will be linearly
interpolated.
Fields§
§position: Position
The position of the point. -1
represents the minimum value along the axis and 1
represents the maximum.
color: Rgb
The color of the point.
Implementations§
source§impl RawPoint
impl RawPoint
sourcepub fn new(position: Position, color: Rgb) -> Self
pub fn new(position: Position, color: Rgb) -> Self
Create a Point at the given position with the given colour.
sourcepub fn with_weight(&self, weight: u32) -> Point
pub fn with_weight(&self, weight: u32) -> Point
Convert to a point compatible with a laser frame stream with the given weight.
sourcepub fn centered_blank() -> Self
pub fn centered_blank() -> Self
Create a blank point at [0, 0]
.
Trait Implementations§
source§impl PartialEq for RawPoint
impl PartialEq for RawPoint
impl Copy for RawPoint
impl StructuralPartialEq for RawPoint
Auto Trait Implementations§
impl RefUnwindSafe for RawPoint
impl Send for RawPoint
impl Sync for RawPoint
impl Unpin for RawPoint
impl UnwindSafe for RawPoint
Blanket Implementations§
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
Mutably borrows from an owned value. Read more