pub struct StreamingVolume {
pub id: u64,
pub name: String,
pub shape: VolumeShape,
pub box_volume: Option<StreamingVolumeBox>,
pub sphere_volume: Option<Sphere>,
pub convex_hull: Option<ConvexHull>,
pub load_radius: f32,
pub unload_radius: f32,
pub importance_weight: f32,
pub target_level_ids: Vec<u64>,
pub is_enabled: bool,
}Fields§
§id: u64§name: String§shape: VolumeShape§box_volume: Option<StreamingVolumeBox>§sphere_volume: Option<Sphere>§convex_hull: Option<ConvexHull>§load_radius: f32§unload_radius: f32§importance_weight: f32§target_level_ids: Vec<u64>§is_enabled: boolImplementations§
Source§impl StreamingVolume
impl StreamingVolume
pub fn new_box( id: u64, name: String, transform: Mat4, half_extents: Vec3, ) -> Self
pub fn new_sphere( id: u64, name: String, center: Vec3, load_radius: f32, unload_radius: f32, ) -> Self
pub fn contains_point(&self, p: Vec3) -> bool
pub fn distance_to_point(&self, p: Vec3) -> f32
pub fn should_trigger_load(&self, p: Vec3) -> bool
pub fn should_trigger_unload(&self, p: Vec3) -> bool
Trait Implementations§
Source§impl Clone for StreamingVolume
impl Clone for StreamingVolume
Auto Trait Implementations§
impl Freeze for StreamingVolume
impl RefUnwindSafe for StreamingVolume
impl Send for StreamingVolume
impl Sync for StreamingVolume
impl Unpin for StreamingVolume
impl UnsafeUnpin for StreamingVolume
impl UnwindSafe for StreamingVolume
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.