pub trait Collider3D {
// Required methods
fn shape(&self) -> ColliderShape3D;
fn bounding_box(&self) -> AABB3D;
fn contains_point(&self, point: Vector3D) -> bool;
fn center(&self) -> Vector3D;
}Expand description
A trait for 3D objects that can participate in collision detection.
Required Methods§
Sourcefn shape(&self) -> ColliderShape3D
fn shape(&self) -> ColliderShape3D
Sourcefn bounding_box(&self) -> AABB3D
fn bounding_box(&self) -> AABB3D
Returns the 3D axis-aligned bounding box that encloses this collider.
§Returns
AABB3D- The bounding box.
Sourcefn contains_point(&self, point: Vector3D) -> bool
fn contains_point(&self, point: Vector3D) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Collider3D for AabbCollider3D
Implements the Collider3D trait for AabbCollider3D.
impl Collider3D for SphereCollider3D
Implements the Collider3D trait for SphereCollider3D.