pub struct Segmentation {
pub enabled: bool,
pub feature_enabled: [[bool; 8]; 8],
pub feature_data: [[i32; 8]; 8],
}Expand description
Segmentation parameters (segmentation_params, §5.9.14).
Fields§
§enabled: boolWhether segmentation is on.
feature_enabled: [[bool; 8]; 8]Per-segment, per-feature enable flags.
feature_data: [[i32; 8]; 8]Per-segment, per-feature clipped values.
Implementations§
Source§impl Segmentation
impl Segmentation
Sourcepub fn feature_active(&self, segment: usize, feature: usize) -> bool
pub fn feature_active(&self, segment: usize, feature: usize) -> bool
seg_feature_active_idx(segment, feature) (§5.11.14).
Sourcepub fn feature_value(&self, segment: usize, feature: usize) -> i32
pub fn feature_value(&self, segment: usize, feature: usize) -> i32
FeatureData[segment][feature] when that feature is active, else 0.
Sourcepub fn last_active_segment(&self) -> usize
pub fn last_active_segment(&self) -> usize
LastActiveSegId (§5.9.14): the highest segment with any feature on.
Trait Implementations§
Source§impl Clone for Segmentation
impl Clone for Segmentation
Source§impl Debug for Segmentation
impl Debug for Segmentation
impl Eq for Segmentation
Source§impl PartialEq for Segmentation
impl PartialEq for Segmentation
impl StructuralPartialEq for Segmentation
Auto Trait Implementations§
impl Freeze for Segmentation
impl RefUnwindSafe for Segmentation
impl Send for Segmentation
impl Sync for Segmentation
impl Unpin for Segmentation
impl UnsafeUnpin for Segmentation
impl UnwindSafe for Segmentation
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