Struct veloren_common::comp::phys::PreviousPhysCache
source · pub struct PreviousPhysCache {
pub velocity_dt: Vec3<f32>,
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_dt: Vec3<f32>
§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 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
§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>
§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.