pub enum PolyhedralCone<N: Real> {
    Full,
    Empty,
    HalfLine(Unit<Vector<N>>),
    HalfSpace(Unit<Vector<N>>),
    OrthogonalSubspace(Unit<Vector<N>>),
    Span([Unit<Vector<N>>; 2]),
}
Expand description

A convex cone with polyhedral faces and its apex at the origin.

A polyhedral cone is a set of half-lines forming a convex set. It is usually used to bound a set of directions like normals and tangents. It must be convex and can be generated from a finite set of vectors.

Variants§

§

Full

A polyhedral cone which is the whole space.

§

Empty

An empty cone containing only the zero vector.

§

HalfLine(Unit<Vector<N>>)

The half-line starting at the origin, pointing toward the given diretion.

§

HalfSpace(Unit<Vector<N>>)

The half-space which boundary has the given diretion as normal.

§

OrthogonalSubspace(Unit<Vector<N>>)

The subspace orthogonal to the given diretion.

§

Span([Unit<Vector<N>>; 2])

All the positive linear combinations of the given set of vectors.

Implementations§

If this polyhedral cone spans a single half-line, returns its direction.

Applies the given transformation to each direction bounded by this cone.

Tests whether the given vector is contained by this cone.

Tests if the polar of this cone contains the given direction.

This test is much sheaper than .contains().

Tests if this cone contains the given unit direction.

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

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

Returns the argument unchanged.

Calls U::from(self).

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

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.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. 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.