Struct rhusics::collide3d::ConvexPolyhedron [] [src]

pub struct ConvexPolyhedron<S> where
    S: BaseFloat
{ /* fields omitted */ }

Convex polyhedron primitive.

Can contain any number of vertices, but a high number of vertices will affect performance of course. It is recommended for high vertex counts, to also provide the faces, this will cause the support function to use hill climbing on a half edge structure, resulting in better performance. The breakpoint is around 250 vertices, but the face version is only marginally slower on lower vertex counts (about 1-2%), while for higher vertex counts it's about 2-5 times faster.

Methods

impl<S> ConvexPolyhedron<S> where
    S: BaseFloat
[src]

[src]

Create a new convex polyhedron from the given vertices.

[src]

Create a new convex polyhedron from the given vertices and faces.

[src]

Create a new convex polyhedron from the given vertices and faces. Will remove any duplicate vertices.

Trait Implementations

impl<S> Clone for ConvexPolyhedron<S> where
    S: Clone + BaseFloat
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S> SupportFunction for ConvexPolyhedron<S> where
    S: BaseFloat
[src]

Point type

[src]

Get the support point on the shape in a given direction. Read more

impl<S> HasAabb for ConvexPolyhedron<S> where
    S: BaseFloat
[src]

Bounding box type

[src]

Get the bounding box of the primitive in local space coordinates.

impl<S> PartialEq<ConvexPolyhedron<S>> for ConvexPolyhedron<S> where
    S: PartialEq<S> + BaseFloat
[src]

[src]

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

[src]

This method tests for !=.

impl<S> Debug for ConvexPolyhedron<S> where
    S: Debug + BaseFloat
[src]

[src]

Formats the value using the given formatter.

impl<S> Discrete<Ray<S, Point3<S>, Vector3<S>>> for ConvexPolyhedron<S> where
    S: BaseFloat
[src]

TODO: better algorithm for finding faces to intersect with?

[src]

Ray must be in object space

impl<S> Continuous<Ray<S, Point3<S>, Vector3<S>>> for ConvexPolyhedron<S> where
    S: BaseFloat
[src]

[src]

Ray must be in object space