Struct re_space_view_spatial::spatial_topology::SubSpace
source · pub struct SubSpace {
pub origin: EntityPath,
pub entities: IntSet<EntityPath>,
pub child_spaces: IntSet<EntityPath>,
pub parent_space: EntityPathHash,
pub connection_to_parent: SubSpaceConnectionFlags,
pub heuristic_hints: IntMap<EntityPath, HeuristicHints>,
}
Expand description
Spatial subspace within we typically expect a homogeneous dimensionality without any projections & disconnects.
Subspaces are separated by projections or explicit disconnects.
A subspace may contain internal transforms, but any such transforms must be invertible such that all data can be represented regardless of choice of origin.
Within the tree of all subspaces, every entity is contained in exactly one subspace.
The subtree at (and including) the origin
minus the
subtrees of all child spaces are considered to be contained in a subspace.
Fields§
§origin: EntityPath
The transform root of this subspace.
This is also used to uniquely identify the space.
entities: IntSet<EntityPath>
All entities that were logged at any point in time and are part of this subspace.
Contains the origin entity as well, unless the origin is the EntityPath::root()
and nothing was logged to it directly.
Note that we this is merely here to speed up queries. Instead, we could check if an entity is equal to or a descendent of the origin and not equal or descendent of any child space. The problem with that is that it’s common for a 3D space to have many 2D spaces as children, which would make this an expensive query.
child_spaces: IntSet<EntityPath>
Origin paths of child spaces.
This implies that there is a either an explicit disconnect or
a projection at the origin of the child space.
How it is connected is implied by connection_to_parent
in the child space.
Any path in child_spaces
is not contained in entities
.
This implies that the camera itself is not part of its 3D space even when it may still have a 3D transform.
parent_space: EntityPathHash
Origin of the parent space.
The root space has EntityPathHash::NONE
as parent.
connection_to_parent: SubSpaceConnectionFlags
The connection to the parent space.
Note that since flags are derived from the presence of components at the origin, the root space still tracks this information.
heuristic_hints: IntMap<EntityPath, HeuristicHints>
Entities in this space that qualify for one or more heuristic hints.
Implementations§
source§impl SubSpace
impl SubSpace
sourcepub fn supports_3d_content(&self) -> bool
pub fn supports_3d_content(&self) -> bool
Whether 3D content in this subspace can be displayed.
sourcepub fn supports_2d_content(&self) -> bool
pub fn supports_2d_content(&self) -> bool
Whether 2D content in this subspace can be displayed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubSpace
impl RefUnwindSafe for SubSpace
impl Send for SubSpace
impl Sync for SubSpace
impl Unpin for SubSpace
impl UnwindSafe for SubSpace
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
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>,
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>
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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>
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>
T
in a tonic::Request