pub struct TransformTreeContext { /* private fields */ }Expand description
Provides a transform tree for the view & time it operates on.
Will do the necessary bulk processing of transform information and make it available for quick lookups by visualizers.
Implementations§
Source§impl TransformTreeContext
impl TransformTreeContext
Sourcepub fn target_from_entity_path(
&self,
entity_path_hash: EntityPathHash,
) -> Option<&Result<TransformInfo, TransformFromToError>>
pub fn target_from_entity_path( &self, entity_path_hash: EntityPathHash, ) -> Option<&Result<TransformInfo, TransformFromToError>>
Returns a transform info describing how to get to the view’s target frame for the given entity.
Sourcepub fn pinhole_tree_root_info(
&self,
frame: TransformFrameIdHash,
) -> Option<&PinholeTreeRoot>
pub fn pinhole_tree_root_info( &self, frame: TransformFrameIdHash, ) -> Option<&PinholeTreeRoot>
Returns the properties of the pinhole tree root at given frame if the entity’s root is a pinhole tree root.
Sourcepub fn target_from_pinhole_root(
&self,
frame: TransformFrameIdHash,
) -> Option<DAffine3>
pub fn target_from_pinhole_root( &self, frame: TransformFrameIdHash, ) -> Option<DAffine3>
Returns the transform from a pinhole root to the target frame if any.
This is effectively the extrinsic portion of the pinhole’s transform to the view’s target frame. Note that this may otherwise not be accessible since we allow both extrinsics and intrinsics to be on a transform between two frames, with no transform frame representing just the extrinsics.
Returns None if the path is not a pinhole root, or is not connected to the target frame or the target frame does not exist in the forest (i.e. is invalid).
Sourcepub fn transform_forest(&self) -> &TransformForest
pub fn transform_forest(&self) -> &TransformForest
The full transform forest
Sourcepub fn target_frame(&self) -> TransformFrameIdHash
pub fn target_frame(&self) -> TransformFrameIdHash
Returns the target frame, also known as the space origin.
Sourcepub fn target_frame_pinhole_root(&self) -> Option<TransformFrameIdHash>
pub fn target_frame_pinhole_root(&self) -> Option<TransformFrameIdHash>
Iff the target frame has a pinhole tree root, returns its transform frame id.
If this is Some, then this is either the frame target frame itself or one of its ancestors.
Some implies that the view as a whole is two dimensional.
Sourcepub fn transform_frame_id_for(
&self,
entity_path: EntityPathHash,
) -> TransformFrameIdHash
pub fn transform_frame_id_for( &self, entity_path: EntityPathHash, ) -> TransformFrameIdHash
Returns the transform frame id for a given entity path.
Sourcepub fn child_frames_for_entity(
&self,
entity_path: EntityPathHash,
) -> impl Iterator<Item = (&TransformFrameIdHash, &TreeTransform)>
pub fn child_frames_for_entity( &self, entity_path: EntityPathHash, ) -> impl Iterator<Item = (&TransformFrameIdHash, &TreeTransform)>
Returns all reachable frame for the current root.
Sourcepub fn lookup_frame_id(
&self,
frame_id_hash: TransformFrameIdHash,
) -> Option<&TransformFrameId>
pub fn lookup_frame_id( &self, frame_id_hash: TransformFrameIdHash, ) -> Option<&TransformFrameId>
Looks up a frame ID by its hash.
Returns None if the frame id hash was never encountered.
pub fn is_empty_frame_name(&self, frame_id_hash: TransformFrameIdHash) -> bool
Sourcepub fn format_frame_or_debug_warn(
&self,
frame_id_hash: TransformFrameIdHash,
debug_location: &EntityPath,
) -> Option<String>
pub fn format_frame_or_debug_warn( &self, frame_id_hash: TransformFrameIdHash, debug_location: &EntityPath, ) -> Option<String>
Formats a frame ID hash as a human-readable string.
Returns the frame name if known, otherwise logs a warning in debug builds and returns None.
Trait Implementations§
Source§impl Clone for TransformTreeContext
impl Clone for TransformTreeContext
Source§fn clone(&self) -> TransformTreeContext
fn clone(&self) -> TransformTreeContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for TransformTreeContext
impl Default for TransformTreeContext
Source§impl IdentifiedViewSystem for TransformTreeContext
impl IdentifiedViewSystem for TransformTreeContext
Source§fn identifier() -> ViewSystemIdentifier
fn identifier() -> ViewSystemIdentifier
crate::ViewClass. Read moreSource§impl ViewContextSystem for TransformTreeContext
impl ViewContextSystem for TransformTreeContext
Source§fn execute_once_per_frame(
ctx: &ViewerContext<'_>,
) -> ViewContextSystemOncePerFrameResult
fn execute_once_per_frame( ctx: &ViewerContext<'_>, ) -> ViewContextSystemOncePerFrameResult
ViewContextSystem, independent of the view’s state, query, blueprint properties etc. Read moreSource§fn execute(
&mut self,
ctx: &ViewContext<'_>,
missing_chunk_reporter: &MissingChunkReporter,
query: &ViewQuery<'_>,
static_execution_result: &ViewContextSystemOncePerFrameResult,
)
fn execute( &mut self, ctx: &ViewContext<'_>, missing_chunk_reporter: &MissingChunkReporter, query: &ViewQuery<'_>, static_execution_result: &ViewContextSystemOncePerFrameResult, )
Auto Trait Implementations§
impl Freeze for TransformTreeContext
impl RefUnwindSafe for TransformTreeContext
impl Send for TransformTreeContext
impl Sync for TransformTreeContext
impl Unpin for TransformTreeContext
impl UnsafeUnpin for TransformTreeContext
impl UnwindSafe for TransformTreeContext
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>
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>
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>
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)
&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)
&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
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>
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