[−][src]Struct bcar::Pose
Basic pose geometry.
Examples
let pose = bcar::Pose::new(1.0, 2.0, 3.0); assert_eq!(1.0, pose.x); assert_eq!(2.0, pose.y); assert_eq!(3.0, pose.h);
Fields
x: f64
y: f64
h: f64
Implementations
impl Pose
[src]
pub fn new(x: f64, y: f64, h: f64) -> Pose
[src]
pub fn default() -> Pose
[src]
Return default pose.
Examples
let pose = bcar::Pose::default(); assert_eq!(pose, bcar::Pose::new(0.0, 0.0, 0.0));
pub fn rotate(&mut self, p: Point, a: f64)
[src]
Rotate self
around p
by a
.
Arguments
p
-- Point to rotateself
around.a
-- Angle to rotateself
by.
Examples
let mut pose = bcar::Pose::new(0.0, 0.0, 0.0); pose.rotate(bcar::Point::new(-1.0, 0.0), std::f64::consts::PI); assert!(pose.x - -2.0 < 0.00001); assert!(pose.y - 0.0 < 0.00001); assert!(pose.h - std::f64::consts::PI < 0.00001);
Trait Implementations
impl Clone for Pose
[src]
impl Copy for Pose
[src]
impl Debug for Pose
[src]
impl PartialEq<Pose> for Pose
[src]
impl StructuralPartialEq for Pose
[src]
Auto Trait Implementations
impl RefUnwindSafe for Pose
impl Send for Pose
impl Sync for Pose
impl Unpin for Pose
impl UnwindSafe for Pose
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,