Struct classicube_sys::Vec3_
source · #[repr(C)]pub struct Vec3_ {
pub x: f32,
pub y: f32,
pub z: f32,
}
Fields§
§x: f32
§y: f32
§z: f32
Implementations§
source§impl Vec3_
impl Vec3_
pub const fn new(x: c_float, y: c_float, z: c_float) -> Self
pub const fn zero() -> Self
pub const fn big_pos() -> Self
pub const fn create(x: c_float, y: c_float, z: c_float) -> Self
pub fn set(&mut self, x: c_float, y: c_float, z: c_float)
pub fn is_zero(&self) -> bool
pub fn length_squared(&self) -> c_float
pub fn lerp(&self, b: Vec3, blend: c_float) -> Self
pub fn normalize(&self) -> Self
pub fn transform(&self, mat: Matrix) -> Self
pub fn transform_y(y: c_float, mat: Matrix) -> Self
pub fn rotate_x(v: Vec3, angle: c_float) -> Self
pub fn rotate_y(v: Vec3, angle: c_float) -> Self
pub fn rotate_y3(x: c_float, y: c_float, z: c_float, angle: c_float) -> Self
pub fn rotate_z(v: Vec3, angle: c_float) -> Self
pub fn floor(&self) -> IVec3
pub fn get_dir_vector(yawRad: c_float, pitchRad: c_float) -> Self
Trait Implementations§
source§impl PartialEq for Vec3_
impl PartialEq for Vec3_
impl Copy for Vec3_
impl StructuralPartialEq for Vec3_
Auto Trait Implementations§
impl Freeze for Vec3_
impl RefUnwindSafe for Vec3_
impl Send for Vec3_
impl Sync for Vec3_
impl Unpin for Vec3_
impl UnwindSafe for Vec3_
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)