Struct nannou_laser::point::RawPoint[][src]

#[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

Create a Point at the given position with the given colour.

Convert to a point compatible with a laser frame stream with the given weight.

Create a blank point at [0, 0].

Returns a point with the same position as self but with a black (blank) color.

Whether or not the point is blank.

A point is considered blank if the colour is black.

Trait Implementations

Produce a point of the same type and position but that is blank.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

The type used to describe the amount of interpolation.

Linearly interpolate from self to dest by the given amt.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.