pub struct SpatialView2D;Implementations§
Source§impl SpatialView2D
Create the outer 2D view, which consists of a scrollable region
impl SpatialView2D
Create the outer 2D view, which consists of a scrollable region
pub fn view_2d( &self, ctx: &ViewerContext<'_>, missing_chunk_reporter: &MissingChunkReporter, ui: &mut Ui, state: &mut SpatialViewState, query: &ViewQuery<'_>, system_output: SystemExecutionOutput, ) -> Result<(), ViewSystemExecutionError>
Trait Implementations§
Source§impl Default for SpatialView2D
impl Default for SpatialView2D
Source§fn default() -> SpatialView2D
fn default() -> SpatialView2D
Returns the “default value” for a type. Read more
Source§impl ViewClass for SpatialView2D
impl ViewClass for SpatialView2D
Source§fn identifier() -> ViewClassIdentifier
fn identifier() -> ViewClassIdentifier
Identifier string of this view class. Read more
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
User-facing name of this view class. Read more
fn help(&self, os: OperatingSystem) -> Help
Source§fn on_register(
&self,
system_registry: &mut ViewSystemRegistrator<'_>,
) -> Result<(), ViewClassRegistryError>
fn on_register( &self, system_registry: &mut ViewSystemRegistrator<'_>, ) -> Result<(), ViewClassRegistryError>
Called once upon registration of the class Read more
Source§fn new_state(&self) -> Box<dyn ViewState>
fn new_state(&self) -> Box<dyn ViewState>
Called once for every new view instance of this class. Read more
Source§fn preferred_tile_aspect_ratio(&self, state: &dyn ViewState) -> Option<f32>
fn preferred_tile_aspect_ratio(&self, state: &dyn ViewState) -> Option<f32>
Preferred aspect ratio for the ui tiles of this view.
Source§fn supports_visible_time_range(&self) -> bool
fn supports_visible_time_range(&self) -> bool
Controls whether the visible time range UI should be displayed for this view.
Source§fn layout_priority(&self) -> ViewClassLayoutPriority
fn layout_priority(&self) -> ViewClassLayoutPriority
Controls how likely this view will get a large tile in the ui.
Source§fn recommended_origin_for_entities(
&self,
entities: &IntSet<EntityPath>,
entity_db: &EntityDb,
) -> Option<EntityPath>
fn recommended_origin_for_entities( &self, entities: &IntSet<EntityPath>, entity_db: &EntityDb, ) -> Option<EntityPath>
Determines a suitable origin given the provided set of entities. Read more
Source§fn spawn_heuristics(
&self,
ctx: &ViewerContext<'_>,
include_entity: &dyn Fn(&EntityPath) -> bool,
) -> ViewSpawnHeuristics
fn spawn_heuristics( &self, ctx: &ViewerContext<'_>, include_entity: &dyn Fn(&EntityPath) -> bool, ) -> ViewSpawnHeuristics
Determines which views should be spawned by default for this class. Read more
Source§fn selection_ui(
&self,
ctx: &ViewerContext<'_>,
ui: &mut Ui,
state: &mut dyn ViewState,
space_origin: &EntityPath,
view_id: ViewId,
) -> Result<(), ViewSystemExecutionError>
fn selection_ui( &self, ctx: &ViewerContext<'_>, ui: &mut Ui, state: &mut dyn ViewState, space_origin: &EntityPath, view_id: ViewId, ) -> Result<(), ViewSystemExecutionError>
Ui shown when the user selects a view of this class.
Source§fn ui(
&self,
ctx: &ViewerContext<'_>,
missing_chunk_reporter: &MissingChunkReporter,
ui: &mut Ui,
state: &mut dyn ViewState,
query: &ViewQuery<'_>,
system_output: SystemExecutionOutput,
) -> Result<(), ViewSystemExecutionError>
fn ui( &self, ctx: &ViewerContext<'_>, missing_chunk_reporter: &MissingChunkReporter, ui: &mut Ui, state: &mut dyn ViewState, query: &ViewQuery<'_>, system_output: SystemExecutionOutput, ) -> Result<(), ViewSystemExecutionError>
Draws the ui for this view class and handles ui events. Read more
Source§fn recommendation_order(&self) -> i32
fn recommendation_order(&self) -> i32
Ordering hint for view class recommendations. Lower values are recommended more. Read more
Source§fn is_experimental(&self) -> bool
fn is_experimental(&self) -> bool
Whether this view class is still experimental. Read more
Source§fn default_query_range(&self, _state: &(dyn ViewState + 'static)) -> QueryRange
fn default_query_range(&self, _state: &(dyn ViewState + 'static)) -> QueryRange
Default query range for this view.
Source§fn recommended_visualizers_for_entity(
&self,
entity_path: &EntityPath,
visualizers_with_reason: &[(ViewSystemIdentifier, &VisualizableReason)],
indicated_entities_per_visualizer: &PerVisualizerType<&IndicatedEntities>,
) -> RecommendedVisualizers
fn recommended_visualizers_for_entity( &self, entity_path: &EntityPath, visualizers_with_reason: &[(ViewSystemIdentifier, &VisualizableReason)], indicated_entities_per_visualizer: &PerVisualizerType<&IndicatedEntities>, ) -> RecommendedVisualizers
Auto picked visualizers for an entity if there was not explicit selection. Read more
Source§fn visualizers_section<'a>(
&'a self,
_ctx: &'a ViewContext<'a>,
) -> Option<VisualizersSectionOutput<'a>>
fn visualizers_section<'a>( &'a self, _ctx: &'a ViewContext<'a>, ) -> Option<VisualizersSectionOutput<'a>>
Custom UI and add-visualizer options for the “Visualizers” section in the selection panel. Read more
Source§fn extra_title_bar_ui(
&self,
_ctx: &ViewerContext<'_>,
_ui: &mut Ui,
_state: &mut (dyn ViewState + 'static),
_space_origin: &EntityPath,
_view_id: BlueprintId<ViewIdRegistry>,
) -> Result<(), ViewSystemExecutionError>
fn extra_title_bar_ui( &self, _ctx: &ViewerContext<'_>, _ui: &mut Ui, _state: &mut (dyn ViewState + 'static), _space_origin: &EntityPath, _view_id: BlueprintId<ViewIdRegistry>, ) -> Result<(), ViewSystemExecutionError>
Additional UI displayed in the tab title bar, between the “maximize” and “help” buttons. Read more
Source§fn handle_component_drop(
&self,
_ctx: &ViewerContext<'_>,
_view_id: BlueprintId<ViewIdRegistry>,
_component_paths: &[ComponentPath],
_released: bool,
) -> DragAndDropFeedback
fn handle_component_drop( &self, _ctx: &ViewerContext<'_>, _view_id: BlueprintId<ViewIdRegistry>, _component_paths: &[ComponentPath], _released: bool, ) -> DragAndDropFeedback
Handle components being dragged over a view of this class. Read more
Auto Trait Implementations§
impl Freeze for SpatialView2D
impl RefUnwindSafe for SpatialView2D
impl Send for SpatialView2D
impl Sync for SpatialView2D
impl Unpin for SpatialView2D
impl UnsafeUnpin for SpatialView2D
impl UnwindSafe for SpatialView2D
Blanket Implementations§
impl<T> Allocation for T
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> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<'a, T> ViewClassExt<'a> for Twhere
T: ViewClass + 'a,
impl<'a, T> ViewClassExt<'a> for Twhere
T: ViewClass + 'a,
fn view_context<'b>( &self, viewer_ctx: &'b ViewerContext<'b>, view_id: BlueprintId<ViewIdRegistry>, view_state: &'b (dyn ViewState + 'static), space_origin: &'b EntityPath, ) -> ViewContext<'b>
impl<T> WasmNotSend for Twhere
T: Send,
impl<T> WasmNotSend for Twhere
T: Send,
impl<T> WasmNotSendSync for Twhere
T: WasmNotSend + WasmNotSync,
impl<T> WasmNotSync for Twhere
T: Sync,
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.