pub struct Root { /* private fields */ }Expand description
The hub of the client. Spatially this is positioned where the client is started so is a stable base to position things relative to.
Implementations§
Source§impl Root
impl Root
pub fn as_spatial_ref(self) -> SpatialRef
Trait Implementations§
Source§impl NodeType for Root
impl NodeType for Root
Source§impl RootAspect for Root
impl RootAspect for Root
fn recv_root_event(&self) -> Option<RootEvent>
Source§async fn get_state(&self) -> NodeResult<ClientState>
async fn get_state(&self) -> NodeResult<ClientState>
Get the current state. Useful to check the state before you initialize your application!
Source§async fn generate_state_token(&self, state: ClientState) -> NodeResult<String>
async fn generate_state_token(&self, state: ClientState) -> NodeResult<String>
Generate a client state token and return it back. Read more
Source§async fn get_connection_environment(&self) -> NodeResult<Map<String, String>>
async fn get_connection_environment(&self) -> NodeResult<Map<String, String>>
Get a hashmap of all the environment variables to connect a given app to the stardust server
Source§fn set_base_prefixes(&self, prefixes: &[String]) -> NodeResult<()>
fn set_base_prefixes(&self, prefixes: &[String]) -> NodeResult<()>
Set initial list of folders to look for namespaced resources in
Source§fn disconnect(&self) -> NodeResult<()>
fn disconnect(&self) -> NodeResult<()>
Cleanly disconnect from the server
Source§impl SpatialRefAspect for Root
impl SpatialRefAspect for Root
Source§async fn get_local_bounding_box(&self) -> NodeResult<BoundingBox>
async fn get_local_bounding_box(&self) -> NodeResult<BoundingBox>
Get the bounding box of this spatial and its children relative to another spatial
Source§async fn get_relative_bounding_box(
&self,
relative_to: &impl SpatialRefAspect,
) -> NodeResult<BoundingBox>
async fn get_relative_bounding_box( &self, relative_to: &impl SpatialRefAspect, ) -> NodeResult<BoundingBox>
Get the bounding box of this spatial and its children relative to itself
Source§async fn get_transform(
&self,
relative_to: &impl SpatialRefAspect,
) -> NodeResult<Transform>
async fn get_transform( &self, relative_to: &impl SpatialRefAspect, ) -> NodeResult<Transform>
Get the transform relative to some other spatial node.
impl Eq for Root
Auto Trait Implementations§
impl Freeze for Root
impl !RefUnwindSafe for Root
impl Send for Root
impl Sync for Root
impl Unpin for Root
impl !UnwindSafe for Root
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