Struct veloren_common::comp::phys::PreviousPhysCache
source · pub struct PreviousPhysCache {
pub velocity: Vec3<f32>,
pub velocity_dt: Vec3<f32>,
pub in_fluid: Option<Fluid>,
pub center: Vec3<f32>,
pub collision_boundary: f32,
pub scale: f32,
pub scaled_radius: f32,
pub neighborhood_radius: f32,
pub origins: Option<(Vec2<f32>, Vec2<f32>)>,
pub pos: Option<Pos>,
pub ori: Quaternion<f32>,
}
Expand description
Cache of Velocity (of last tick) * dt (of curent tick) It’s updated and read in physics sys to speed up entity<->entity collisions no need to send it via network
Fields§
§velocity: Vec3<f32>
§velocity_dt: Vec3<f32>
§in_fluid: Option<Fluid>
§center: Vec3<f32>
Center of bounding sphere that encompasses the entity along its path for this tick
collision_boundary: f32
Calculates a Sphere over the Entity for quick boundary checking
scale: f32
§scaled_radius: f32
Approximate radius of cylinder of collider.
neighborhood_radius: f32
Radius of stadium of collider.
origins: Option<(Vec2<f32>, Vec2<f32>)>
relative p0 and p1 of collider’s statium, None if cylinder.
pos: Option<Pos>
§ori: Quaternion<f32>
Trait Implementations§
source§impl Clone for PreviousPhysCache
impl Clone for PreviousPhysCache
source§fn clone(&self) -> PreviousPhysCache
fn clone(&self) -> PreviousPhysCache
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Component for PreviousPhysCache
impl Component for PreviousPhysCache
§type Storage = VecStorage<PreviousPhysCache>
type Storage = VecStorage<PreviousPhysCache>
Associated storage type for this component.
source§impl Debug for PreviousPhysCache
impl Debug for PreviousPhysCache
source§impl Default for PreviousPhysCache
impl Default for PreviousPhysCache
source§fn default() -> PreviousPhysCache
fn default() -> PreviousPhysCache
Returns the “default value” for a type. Read more
source§impl PartialEq for PreviousPhysCache
impl PartialEq for PreviousPhysCache
source§fn eq(&self, other: &PreviousPhysCache) -> bool
fn eq(&self, other: &PreviousPhysCache) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PreviousPhysCache
impl StructuralPartialEq for PreviousPhysCache
Auto Trait Implementations§
impl Freeze for PreviousPhysCache
impl RefUnwindSafe for PreviousPhysCache
impl Send for PreviousPhysCache
impl Sync for PreviousPhysCache
impl Unpin for PreviousPhysCache
impl UnwindSafe for PreviousPhysCache
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
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.