[−][src]Struct nannou_laser::point::Point
The point type used within the laser frame stream API.
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.
weight: u32
The minimum number of extra times this point should be drawn.
0
is the default used for drawing sequences of smooth line segments.
Values greater than 0
are useful for accenting individual points.
Implementations
impl Point
[src]
pub const DEFAULT_LINE_POINT_WEIGHT: u32
[src]
The default weight for points used to draw lines.
pub fn new(position: Position, color: Rgb) -> Self
[src]
Create a Point at the given position with the given colour with a default weight.
pub fn with_weight(position: Position, color: Rgb, weight: u32) -> Self
[src]
The same as Point::new
but allows for specifying the weight of the point.
pub fn centered_blank() -> Self
[src]
Create a blank point at [0, 0]
.
pub fn blanked(&self) -> Self
[src]
Returns a point with the same position as self
but with a black (blank) color.
pub fn is_blank(&self) -> bool
[src]
Whether or not the point is blank.
A point is considered blank if the colour is black.
pub fn to_raw(&self) -> RawPoint
[src]
Converts to a single raw point with the same position and color.
pub fn to_raw_weighted(&self) -> impl Iterator<Item = RawPoint>
[src]
Converts to weight
number of raw points with the same position and color.
Trait Implementations
impl AsRef<Point> for Point
[src]
impl Clone for Point
[src]
impl Copy for Point
[src]
impl Debug for Point
[src]
impl From<Point> for RawPoint
[src]
impl Hash for Point
[src]
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl IsBlank for Point
[src]
impl PartialEq<Point> for Point
[src]
impl Position for Point
[src]
impl StructuralPartialEq for Point
[src]
impl Weight for Point
[src]
Auto Trait Implementations
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,