Struct gut::mesh::LineMesh[][src]

pub struct LineMesh<T> where
    T: Real
{ pub vertex_positions: IntrinsicAttribute<[T; 3], VertexIndex>, pub indices: IntrinsicAttribute<[usize; 2], FaceIndex>, pub vertex_attributes: HashMap<String, Attribute<VertexIndex>, RandomState, Global>, pub face_attributes: HashMap<String, Attribute<FaceIndex>, RandomState, Global>, pub face_vertex_attributes: HashMap<String, Attribute<FaceVertexIndex>, RandomState, Global>, pub face_edge_attributes: HashMap<String, Attribute<FaceEdgeIndex>, RandomState, Global>, pub attribute_value_cache: HashSet<Value<MaybeUninit<usize>, AttributeValueHashVTable>, RandomState, Global>, }

Fields

vertex_positions: IntrinsicAttribute<[T; 3], VertexIndex>

Vertex positions.

indices: IntrinsicAttribute<[usize; 2], FaceIndex>

Pairs of indices into vertices representing line segments.

vertex_attributes: HashMap<String, Attribute<VertexIndex>, RandomState, Global>

Vertex attributes.

face_attributes: HashMap<String, Attribute<FaceIndex>, RandomState, Global>

Line segment attributes.

face_vertex_attributes: HashMap<String, Attribute<FaceVertexIndex>, RandomState, Global>

Line segment vertex attributes.

face_edge_attributes: HashMap<String, Attribute<FaceEdgeIndex>, RandomState, Global>

Line segment edge attributes.

A line segment can be seen as having two directed edges.

attribute_value_cache: HashSet<Value<MaybeUninit<usize>, AttributeValueHashVTable>, RandomState, Global>

Indirect attribute value cache

Implementations

Iterate over each face.

Iterate mutably over each face.

Face accessor. These are vertex indices.

Return a slice of individual faces.

Reverse the order of each polygon in this mesh.

Reverse the order of each polygon in this mesh. This is the consuming version of the reverse method.

Sort vertices by the given key values.

Trait Implementations

Get the size of the attribute at the appropriate mesh location determined by I.

Read only access to the attribute dictionary.

Read and write access to the attribute dictionary.

Read and write access to the attribute dictionary along with a cache for indirect attribute values. Read more

Add an attribute at the appropriate location with a given default.

Construct an attribute from a given data Vec<T>. data must have exactly the right size for the attribute to be added successfully. Read more

Sets the attribute to the specified default value whether or not it already exists. Read more

Set an attribute to the given data slice. data must have exactly the right size for the attribute to be set successfully. Read more

Add an indirect attribute at the appropriate location with a given default.

Sets the indirect attribute to the specified default value whether or not it already exists. Read more

Construct an indirect attribute from a given IndirectData. data must have exactly the right size for the attribute to be added successfully. Read more

Set an indirect attribute to the given IndirectData instance. data must have exactly the right size for the attribute to be set successfully. Read more

Makes a copy of an existing attribute. Read more

Remove an attribute from the attribute dictionary. Read more

Inserts an attribute into the dictionary with the usual HashMap semantics. Read more

Retrieve the attribute with the given name and if it doesn’t exist, add a new one and set it to a given default value. In either case the mutable reference to the attribute is returned. Read more

Retrieve the attribute with the given name and if it doesn’t exist, set its data to what’s in the given slice. In either case the mutable reference to the attribute is returned. Read more

Retrieve the indirect attribute with the given name and if it doesn’t exist, add a new one and set it to a given default value. In either case the mutable reference to the attribute is returned. Read more

Get the attribute iterator for a direct attribute.

Get the attribute mutable iterator for a direct attribute. Read more

Get the iterator for an attribute no matter what kind.

Update indirect attribute entries with the given closure. Read more

Return true if the given attribute exists at the given location, and false otherwise, even if the specified attribute location is invalid for the mesh. Read more

Determine if the given attribute is valid and exists at the given location. Read more

Expose the underlying direct attribute as a slice.

Expose the underlying direct attribute as a mutable slice.

Clone attribute data into a Vec<T>. Read more

Clone direct attribute data into a Vec<T>.

Borrow the raw attribute from the attribute dictionary. From there you can use methods defined on the attribute itself. Read more

Get the raw mutable attribute from the attribute dictionary. From there you can use methods defined on the attribute itself. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Produce an empty mesh. This is not particularly useful on its own, however it can be used as a null case for various mesh algorithms.

Mesh implementation of the attribute size getter.

Mesh implementation of the attribute dictionary getter.

Mesh implementation of the attribute dictionary mutable getter.

Mesh implementation of the attribute dictionary and cache mutable getter.

Index of the destination element given the topology index.

Toplogy index: where the data lives in an attribute array.

Topology quantifier. Number of connectors in total.

Topology quantifier. Number of connectors at a particular element.

Index of the destination element from the source index.

Mesh implementation of the attribute size getter.

Mesh implementation of the attribute dictionary getter.

Mesh implementation of the attribute dictionary mutable getter.

Mesh implementation of the attribute dictionary and cache mutable getter.

Index of the destination element given the topology index.

Toplogy index: where the data lives in an attribute array.

Topology quantifier. Number of connectors in total.

Topology quantifier. Number of connectors at a particular element.

Index of the destination element from the source index.

Generate the reverse topology structure.

Generate the reverse topology structure from the destination element to the source topology element. Read more

Mesh implementation of the attribute size getter.

Mesh implementation of the attribute dictionary getter.

Mesh implementation of the attribute dictionary mutable getter.

Mesh implementation of the attribute dictionary and cache mutable getter.

Convert a PolyMesh into a LineMesh. This is effectively a wireframe construction.

Note that this conversion does not merge any attributes, each face will generate its own edge. This means that two neighbouring faces will generate two overlapping edges. This is done to preserve all attribute data during the conversion, which means that some of it is duplicated.

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

This method tests for !=.

Mesh implementation of the attribute size getter.

Mesh implementation of the attribute dictionary getter.

Mesh implementation of the attribute dictionary mutable getter.

Mesh implementation of the attribute dictionary and cache mutable getter.

Vertex positions as a slice of triplets.

Vertex positions as a mutable slice of triplets.

Vertex iterator.

Mutable vertex iterator.

Vertex accessor.

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

Compute the bounding box of this object.

Get a slice of bytes representing Self.

Panics if the size of the given bytes slice is not equal to the size of Self.

Additional topology that may aid in computing connectivity. Read more

Precompute additional topology information prior to determining connectivity. Read more

Get the number of elements which are considered for connectivity Read more

Push all neighbours of the element at the given index to the given stack. Read more

Determine the connectivity of a set of meshes. Read more

Determine the connectivity of a set of meshes. Read more

Determine the connectivity of a set of meshes. Read more

Additional topology that may aid in computing connectivity. Read more

Precompute additional topology information prior to determining connectivity. Read more

Get the number of elements which are considered for connectivity Read more

Push all neighbours of the element at the given index to the given stack. Read more

Determine the connectivity of a set of meshes. Read more

Determine the connectivity of a set of meshes. Read more

Determine the connectivity of a set of meshes. Read more

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

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

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

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Return a value at the given index. This is provided as the checked version of get that will panic if the equivalent get call is None, which typically means that the given index is out of bounds. Read more

Return a value at the given index. This is provided as the unchecked version of get that has undefined behavior when the index is out of bounds. Read more

Performs the conversion.

Return a value at the given index. This is provided as the checked version of try_isolate that will panic if the equivalent try_isolate call is None, which typically means that the given index is out of bounds. Read more

Returns a partitioning by unique values of the given attribute. Read more

Returns a partitioning by unique values of the given attribute. Read more

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

This method tells this type how it can be pushed to a Vec as an array.

Rotate the mesh using the given column-major rotation matrix.

Rotate the object around the given unit vector u by the given angle theta (in radians). Read more

Rotate the object using the given Euler vector (or rotation vector) e. The direction of e specifies the axis of rotation and its magnitude is the angle in radians. Read more

Return a version of self rotated about the unit vector u by the given angle theta (in radians). Read more

Return a version of self rotated using the given column-major rotation matrix

Return a version of self rotated about the Euler vector e.

Should always be Self

Scale a mesh in 3D by a given vector of scale factors. s = [1.0; 3] corresponds to a noop.

Uniformly scale the given object by the given factor in all dimensions.

Return a scaled version of self.

Return a uniformly scaled version of self.

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

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

Translate the mesh by the given translation vector (displacement) t.

Return a version of self translated by the given translation vector t.

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.