Struct bevy_math::primitives::Cone
source · pub struct Cone {
pub radius: f32,
pub height: f32,
}
Expand description
A cone primitive.
Fields§
§radius: f32
The radius of the base
height: f32
The height of the cone
Implementations§
source§impl Cone
impl Cone
sourcepub fn slant_height(&self) -> f32
pub fn slant_height(&self) -> f32
Get the slant height of the cone, the length of the line segment connecting a point on the base to the apex
sourcepub fn lateral_area(&self) -> f32
pub fn lateral_area(&self) -> f32
Get the surface area of the side of the cone, also known as the lateral area
Trait Implementations§
source§impl Bounded3d for Cone
impl Bounded3d for Cone
source§fn aabb_3d(&self, translation: Vec3, rotation: Quat) -> Aabb3d
fn aabb_3d(&self, translation: Vec3, rotation: Quat) -> Aabb3d
Get an axis-aligned bounding box for the shape with the given translation and rotation
source§fn bounding_sphere(&self, translation: Vec3, rotation: Quat) -> BoundingSphere
fn bounding_sphere(&self, translation: Vec3, rotation: Quat) -> BoundingSphere
Get a bounding sphere for the shape with the given translation and rotation
source§impl<'de> Deserialize<'de> for Cone
impl<'de> Deserialize<'de> for Cone
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Cone
impl PartialEq for Cone
impl Copy for Cone
impl Primitive3d for Cone
impl StructuralPartialEq for Cone
Auto Trait Implementations§
impl RefUnwindSafe for Cone
impl Send for Cone
impl Sync for Cone
impl Unpin for Cone
impl UnwindSafe for Cone
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