Enum VertexAnchor

Source
pub enum VertexAnchor {
    Node(NodeIdType),
    Curve(CurveIdType),
    Surface(SurfaceIdType),
    Body(BodyIdType),
}
Expand description

Geometrical mesh anchor.

This enum is used as an attribute to link mesh vertices to entities of the represented geometry.

The AttributeUpdate implementation is used to enforce the dimensional conditions required to merge two anchors. The merge-ability of two anchors also depends on their intersection; we expect this to be handled outside of the merge functor, as doing it inside would require leaking map data into the trait’s methods.

Variants§

§

Node(NodeIdType)

Vertex is linked to a node.

§

Curve(CurveIdType)

Vertex is linked to a curve.

§

Surface(SurfaceIdType)

Vertex is linked to a surface.

§

Body(BodyIdType)

Vertex is linked to a 3D body.

Trait Implementations§

Source§

impl AttributeBind for VertexAnchor

Source§

const BIND_POLICY: OrbitPolicy = OrbitPolicy::Vertex

[OrbitPolicy] determining the kind of topological entity to which the attribute is associated.
Source§

type StorageType = AttrSparseVec<VertexAnchor>

Storage type used for the attribute.
Source§

type IdentifierType = u32

Identifier type of the entity the attribute is bound to.
Source§

impl AttributeUpdate for VertexAnchor

Source§

fn merge(attr1: Self, attr2: Self) -> Result<Self, AttributeError>

Merging routine, i.e. how to obtain a new value from two existing ones. Read more
Source§

fn split(attr: Self) -> Result<(Self, Self), AttributeError>

Splitting routine, i.e. how to obtain the two new values from a single one. Read more
§

fn merge_incomplete(_: Self) -> Result<Self, AttributeError>

Fallback merging routine, i.e. how to obtain a new value from a single existing one. Read more
§

fn merge_from_none() -> Result<Self, AttributeError>

Fallback merging routine, i.e. how to obtain a new value from no existing one. Read more
§

fn split_from_none() -> Result<(Self, Self), AttributeError>

Fallback splitting routine, i.e. how to obtain two new values from no existing one. Read more
Source§

impl Clone for VertexAnchor

Source§

fn clone(&self) -> VertexAnchor

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for VertexAnchor

Source§

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

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

impl Hash for VertexAnchor

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for VertexAnchor

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for VertexAnchor

Source§

impl Eq for VertexAnchor

Source§

impl StructuralPartialEq for VertexAnchor

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
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSend for T
where T: Any + Send,

§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.