Skip to main content

MeshChanges

Struct MeshChanges 

Source
pub struct MeshChanges {
    pub id: MeshId,
    pub changes: Option<ChangeSet>,
    pub placement_changed: bool,
    pub added: bool,
    pub removed: bool,
    pub colors_dirty: Option<Vec<VertexId>>,
    pub normals_dirty: Option<Vec<VertexId>>,
    pub fields_changed: Vec<FieldId>,
    pub sections_changed: Vec<SectionId>,
    pub channels_written: Vec<String>,
}
Expand description

What happened to one mesh since the subscriber’s last Scene::take_changes_for (or Scene::take_changes for the default subscriber).

Fields§

§id: MeshId

The mesh. For a removed mesh this id no longer matches.

§changes: Option<ChangeSet>

The merged changes of every commit, undo and redo since the last call. None means “treat everything as changed”: the mesh was added or compacted, or an undo or redo touching it failed with SceneError::Corrupted.

§placement_changed: bool

True if the placement changed at any point since the last call, even if it was changed back.

§added: bool

The mesh was added since the last call.

§removed: bool

The mesh was removed since the last call.

§colors_dirty: Option<Vec<VertexId>>

The vertices whose colours changed since the last call, ascending without duplicates. Some of an empty list when no colour changed; None means “every colour may have changed” (redraw them all).

§normals_dirty: Option<Vec<VertexId>>

The vertices whose normals changed since the last call, with the same semantics as MeshChanges::colors_dirty: ascending without duplicates, None for “every normal may have changed”. Only reported while normals are on (see Scene::set_normals), apart from the None of an added or fully changed mesh.

§fields_changed: Vec<FieldId>

The fields on this mesh whose values changed since the last call, each once.

§sections_changed: Vec<SectionId>

The sections whose result for this mesh changed since the last call (recomputed to a different result, removed, or no longer selecting the mesh), each once, in the order first reported.

§channels_written: Vec<String>

The channels written through Scene::derived_channel_mut, added with Scene::add_channel or removed with Scene::remove_channel, or dropped or restored as a whole by an edit, its undo or redo (ChangeSet::channels_toggled), since the last call, each name once, in the order first reported. A derived_channel_mut call counts as a write whether or not the slice is then written.

Trait Implementations§

Source§

impl Clone for MeshChanges

Source§

fn clone(&self) -> MeshChanges

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MeshChanges

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for MeshChanges

Source§

impl PartialEq for MeshChanges

Source§

fn eq(&self, other: &MeshChanges) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MeshChanges

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.