pub trait Primitive {
type Point: EuclideanSpace;
// Required method
fn support_point<T>(
&self,
direction: &<Self::Point as EuclideanSpace>::Diff,
transform: &T,
) -> Self::Point
where T: Transform<Self::Point>;
}
Expand description
Minkowski support function for primitive
Required Associated Types§
Sourcetype Point: EuclideanSpace
type Point: EuclideanSpace
Point type
Required Methods§
Sourcefn support_point<T>(
&self,
direction: &<Self::Point as EuclideanSpace>::Diff,
transform: &T,
) -> Self::Point
fn support_point<T>( &self, direction: &<Self::Point as EuclideanSpace>::Diff, transform: &T, ) -> Self::Point
Get the support point on the shape in a given direction.
§Parameters
direction
: The search direction in world space.transform
: The current local to world transform for this primitive.
§Returns
Return the point that is furthest away from the origin, in the given search direction. For discrete shapes, the furthest vertex is enough, there is no need to do exact intersection point computation.
§Type parameters
P
: Transform type
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.