pub struct Sphere {
pub center: Vec3,
pub radius: f32,
}Fields§
§center: Vec3§radius: f32Implementations§
Source§impl Sphere
impl Sphere
Source§impl Sphere
impl Sphere
Sourcepub fn broadphase(&self) -> Sphere
pub fn broadphase(&self) -> Sphere
Sourcepub fn obb(&self) -> Cuboid
pub fn obb(&self) -> Cuboid
See Bounded::obb
Sourcepub fn aabb(&self) -> Cuboid
pub fn aabb(&self) -> Cuboid
See Bounded::aabb
Trait Implementations§
Source§impl<PCL: PointCloudMarker> ColliderComponent<PCL> for Sphere
impl<PCL: PointCloudMarker> ColliderComponent<PCL> for Sphere
fn add_to_shapes(self, c: &mut Collider<PCL>)
Source§impl ColliderQuery<NoPcl> for Sphere
impl ColliderQuery<NoPcl> for Sphere
Source§impl ColliderQuery<Pointcloud> for Sphere
impl ColliderQuery<Pointcloud> for Sphere
fn query_collider(&self, c: &Collider<Pointcloud>) -> bool
Source§impl Collides<ConvexPolygon> for Sphere
impl Collides<ConvexPolygon> for Sphere
Source§impl Collides<ConvexPolytope> for Sphere
impl Collides<ConvexPolytope> for Sphere
Source§impl Collides<LineSegment> for Sphere
impl Collides<LineSegment> for Sphere
Source§impl Collides<Pointcloud> for Sphere
impl Collides<Pointcloud> for Sphere
Source§impl Collides<Sphere> for ConvexPolygon
impl Collides<Sphere> for ConvexPolygon
Source§impl Collides<Sphere> for ConvexPolytope
impl Collides<Sphere> for ConvexPolytope
Source§impl Collides<Sphere> for LineSegment
impl Collides<Sphere> for LineSegment
Source§impl Collides<Sphere> for Pointcloud
impl Collides<Sphere> for Pointcloud
Source§impl From<Sphere> for ConvexPolytope
Approximate a sphere as a convex polytope using an icosphere with 42 vertices.
impl From<Sphere> for ConvexPolytope
Approximate a sphere as a convex polytope using an icosphere with 42 vertices.
Source§impl Stretchable for Sphere
impl Stretchable for Sphere
Source§impl Transformable for Sphere
impl Transformable for Sphere
fn translate(&mut self, offset: Vec3A)
fn rotate_mat(&mut self, _mat: Mat3A)
fn rotate_quat(&mut self, _quat: Quat)
fn transform(&mut self, mat: Affine3A)
fn translated(&self, offset: Vec3A) -> Self
fn translate_d(&mut self, offset: DVec3)
fn translated_d(&self, offset: DVec3) -> Self
fn rotated_mat(&self, mat: Mat3A) -> Self
fn rotate_mat_d(&mut self, mat: DMat3)
fn rotated_mat_d(&self, mat: DMat3) -> Self
fn rotated_quat(&self, quat: Quat) -> Self
fn rotate_quat_d(&mut self, quat: DQuat)
fn rotated_quat_d(&self, quat: DQuat) -> Self
fn transformed(&self, mat: Affine3A) -> Self
fn transform_d(&mut self, mat: DAffine3)
fn transformed_d(&self, mat: DAffine3) -> Self
impl Copy for Sphere
impl StructuralPartialEq for Sphere
Auto Trait Implementations§
impl Freeze for Sphere
impl RefUnwindSafe for Sphere
impl Send for Sphere
impl Sync for Sphere
impl Unpin for Sphere
impl UnsafeUnpin for Sphere
impl UnwindSafe for Sphere
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more