Struct soft_edge::InteriorHull[][src]

pub struct InteriorHull { /* fields omitted */ }
Expand description

Triangles which lie on the planes of the faces of an atom are taken care of by Faces. However, we still need to complete the picture by adding back in any missing facets which lie “inside” that cube (and not on its faces.) There are 8 ways to choose 3 triangles from eight vertices. Of these 56 possible triangles, there are 4 times 24 which exist on the faces of the cube, and which are therefore superseded by the Face calculations. We now have 32 triangles remaining. Of these, we have six “symmetry planes” of the cube; these are the planes that run through an edge each, and both contain four vertices. Like the face quads, these contain 24 possible triangles, which leaves us with a total of 8 anomalous configurations. To sum up (pun intended):

  • 56 total triangles (8 choose 3). (Given a quad, there are four triangles in it; divide it in half, then flip the edge to get the other two.)
    • 6 quads in cube faces = 24 triangle configurations
    • 6 quads in symmetry planes = 24 triangle configurations
    • 8 remaining triangles (anomalous configurations)

32 of these configurations are ones we’re interested in. 24 of these can be enumerated by enumerating the symmetry planes, and at the same time can be collapsed into a quad in order to remain as simplified as possible (or we can triangulate them for good measure.) The remaining 8 are more troublesome, but can be enumerated as sets where no vertex shares an edge. How can we know this? Let’s think through it.

Suppose a vertex shares an edge with another vertex in this triangle. There are three other edges on which to choose the last vertex. Two of them would put the triangle on the faces of the cube. The remaining option will place the triangle on one of the symmetry planes.

So, it seems obvious that the remaining configurations are those where the vertices don’t even share an edge, let alone a face. The number of these is only eight, so we can enumerate them (see ANOMALOUS_CONFIGURATIONS.) These are simple to deal with as well, as they can never be collapsed into a quad, at least not within a single Atom, because these are the groups of three vertices which are alone on their plane within the cube.

Implementations

Generate the interior hull of an atom.

Return an iterator over all facets on the interior hull.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

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

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

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

Converts self into T using Into<T>. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Performs the conversion.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Should always be 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.

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

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)

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

Attempts to convert self into T using TryInto<T>. Read more

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.