Struct bevy_math::primitives::Line2d
source · pub struct Line2d {
pub direction: Direction2d,
}
Expand description
An infinite line along a direction in 2D space.
For a finite line: Segment2d
Fields§
§direction: Direction2d
The direction of the line. The line extends infinitely in both the given direction and its opposite direction
Trait Implementations§
source§impl Bounded2d for Line2d
impl Bounded2d for Line2d
source§fn aabb_2d(&self, translation: Vec2, rotation: f32) -> Aabb2d
fn aabb_2d(&self, translation: Vec2, rotation: f32) -> Aabb2d
Get an axis-aligned bounding box for the shape with the given translation and rotation.
The rotation is in radians, counterclockwise, with 0 meaning no rotation.
source§fn bounding_circle(&self, translation: Vec2, _rotation: f32) -> BoundingCircle
fn bounding_circle(&self, translation: Vec2, _rotation: f32) -> BoundingCircle
Get a bounding circle for the shape
The rotation is in radians, counterclockwise, with 0 meaning no rotation.
source§impl<'de> Deserialize<'de> for Line2d
impl<'de> Deserialize<'de> for Line2d
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 Line2d
impl PartialEq for Line2d
impl Copy for Line2d
impl Primitive2d for Line2d
impl StructuralPartialEq for Line2d
Auto Trait Implementations§
impl RefUnwindSafe for Line2d
impl Send for Line2d
impl Sync for Line2d
impl Unpin for Line2d
impl UnwindSafe for Line2d
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