Type Alias Vector

Source
pub type Vector = Vec3;
Expand description

3D Vector representing position, velocity, direction, etc. This is the most commonly used vector type in UE.

Aliased Type§

#[repr(C)]
pub struct Vector { pub x: f32, pub y: f32, pub z: f32, }

Fields§

§x: f32§y: f32§z: f32

Trait Implementations§

Source§

impl BinarySerializable for Vector

Source§

fn to_binary(&self) -> Result<Vec<u8>, Error>
where Self: Serialize,

Serialize to binary format
Source§

fn from_binary(data: &[u8]) -> Result<Self, Error>
where Self: DeserializeOwned,

Deserialize from binary format
Source§

impl VectorExt for Vector

Source§

fn size(self) -> f32

Get the size (magnitude) of the vector
Source§

fn size_squared(self) -> f32

Get the squared size (magnitude squared) - faster than size()
Source§

fn is_nearly_zero(self, tolerance: f32) -> bool

Check if the vector is nearly zero
Source§

fn is_normalized(self) -> bool

Check if the vector is normalized (unit length)
Source§

fn get_safe_normal(self, tolerance: f32) -> Vector

Get a normalized copy of the vector