#[repr(C)]pub struct Vector4D<S = f32, U = ()> {
pub x: S,
pub y: S,
pub z: S,
pub w: S,
/* private fields */
}
Expand description
4D vector.
Fields§
§x: S
§y: S
§z: S
§w: S
Implementations§
Trait Implementations§
source§impl<S, U> Mul<Vector4D<S, U>> for Vector4D<S, U>where
S: Mul<Output = S> + Add<Output = S> + Copy,
impl<S, U> Mul<Vector4D<S, U>> for Vector4D<S, U>where S: Mul<Output = S> + Add<Output = S> + Copy,
source§impl Mul<Vector4D<f32, ()>> for Transform3D<f32>
impl Mul<Vector4D<f32, ()>> for Transform3D<f32>
Transform a Vector4D
with a Transform3D
.
use rgx::math::*;
let m = Transform3D::from_translation(Vector3D::new(8., 8., 0.));
let v = Vector4D::new(1., 1., 0., 1.);
assert_eq!(m * v, Vector4D::new(9., 9., 0., 1.));
source§impl<S: PartialEq, U: PartialEq> PartialEq<Vector4D<S, U>> for Vector4D<S, U>
impl<S: PartialEq, U: PartialEq> PartialEq<Vector4D<S, U>> for Vector4D<S, U>
impl<S: Copy, U: Copy> Copy for Vector4D<S, U>
impl<S: Eq, U: Eq> Eq for Vector4D<S, U>
impl<S, U> StructuralEq for Vector4D<S, U>
impl<S, U> StructuralPartialEq for Vector4D<S, U>
Auto Trait Implementations§
impl<S, U> RefUnwindSafe for Vector4D<S, U>where S: RefUnwindSafe, U: RefUnwindSafe,
impl<S, U> Send for Vector4D<S, U>where S: Send, U: Send,
impl<S, U> Sync for Vector4D<S, U>where S: Sync, U: Sync,
impl<S, U> Unpin for Vector4D<S, U>where S: Unpin, U: Unpin,
impl<S, U> UnwindSafe for Vector4D<S, U>where S: UnwindSafe, U: UnwindSafe,
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