Struct glm_color::ycbcr::YCbCr [] [src]

pub struct YCbCr { /* fields omitted */ }

The YCbCr color model.

See

Wikipedia page YCbCr.

Example

use glm_color::*;

let brown_yuv: YCbCr = ColorSpace::from_rgb(BROWN);
assert_eq!(brown_yuv.y(), BROWN.lunimance());

Methods

impl YCbCr
[src]

Constructs a YCbCr value.

Parameter y is clampped to the range [0, 1], and cb and cr are clampped to the range [-0.5, 0.5].

Re-interprets a reference of YCbCr to Vec3.

Returns the Y` component, which is a value in the range [0, 1].

Returns theCb component, which is a value in the range [-0.5, 0.5].

Returns the Cr` component, which is a value in the range [-0.5, 0.5].

Trait Implementations

impl Copy for YCbCr
[src]

impl Clone for YCbCr
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for YCbCr
[src]

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

This method tests for !=.

impl Debug for YCbCr
[src]

Formats the value using the given formatter.

impl Eq for YCbCr
[src]

impl ApproxEq for YCbCr
[src]

Returns true if the difference between x and y is less than max_diff. Read more

Returns true if the difference between x and y is less than machine epsilon. Read more

impl Rand for YCbCr
[src]

Generates a random instance of this type using the specified source of randomness. Read more

impl ColorSpace for YCbCr
[src]

Note

Constants defined in ITU-R BT-709 conversion are used.

Converts self to a color value in RGB color space.