pub struct SpatialService { /* private fields */ }Expand description
Kernel service for the spatial BVH index.
Implementations§
Source§impl SpatialService
impl SpatialService
Sourcepub fn new(
config: SpatialServiceConfig,
backend: Arc<dyn SpatialBackend>,
) -> Self
pub fn new( config: SpatialServiceConfig, backend: Arc<dyn SpatialBackend>, ) -> Self
Wrap an existing backend.
Sourcepub fn from_config(config: SpatialServiceConfig) -> Self
pub fn from_config(config: SpatialServiceConfig) -> Self
Construct the default BVH backend from config.
Sourcepub fn from_spatial_config(cfg: &SpatialConfig) -> Self
pub fn from_spatial_config(cfg: &SpatialConfig) -> Self
Construct from types-layer SpatialConfig.
Sourcepub fn attach_chain(&self, cm: Arc<ChainManager>)
pub fn attach_chain(&self, cm: Arc<ChainManager>)
Attach ExoChain sink to the underlying BVH backend.
Sourcepub fn backend(&self) -> &Arc<dyn SpatialBackend> ⓘ
pub fn backend(&self) -> &Arc<dyn SpatialBackend> ⓘ
Shared backend handle.
Sourcepub fn bvh(&self) -> Option<&Arc<BvhBackend>>
pub fn bvh(&self) -> Option<&Arc<BvhBackend>>
Concrete BVH backend when available.
Sourcepub fn insert(&self, leaf: Leaf) -> SpatialResult<LeafId>
pub fn insert(&self, leaf: Leaf) -> SpatialResult<LeafId>
Insert a leaf.
Sourcepub fn query_point(&self, p: Vec3) -> Vec<LeafId>
pub fn query_point(&self, p: Vec3) -> Vec<LeafId>
Query point.
Sourcepub fn query_aabb(&self, bb: Aabb) -> Vec<LeafId>
pub fn query_aabb(&self, bb: Aabb) -> Vec<LeafId>
Query AABB.
Sourcepub fn query_frustum(&self, frustum: &Frustum) -> Vec<LeafId>
pub fn query_frustum(&self, frustum: &Frustum) -> Vec<LeafId>
Query frustum.
Sourcepub fn derive_branch(&self, meta: BranchMeta) -> SpatialResult<BranchId>
pub fn derive_branch(&self, meta: BranchMeta) -> SpatialResult<BranchId>
Derive a branch.
Sourcepub fn branch_diff(
&self,
a: BranchId,
b: BranchId,
region: Aabb,
) -> Vec<DiffEntry>
pub fn branch_diff( &self, a: BranchId, b: BranchId, region: Aabb, ) -> Vec<DiffEntry>
Branch diff.
Sourcepub fn status(&self) -> SpatialServiceStatus
pub fn status(&self) -> SpatialServiceStatus
Status snapshot for CLI / health_detail.
Trait Implementations§
Source§impl SystemService for SpatialService
impl SystemService for SpatialService
Source§fn service_type(&self) -> ServiceType
fn service_type(&self) -> ServiceType
Service type category.
Source§fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start the service.
Source§fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the service.
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform a health check.
Source§fn health_detail(&self) -> Option<String>
fn health_detail(&self) -> Option<String>
Optional operator-facing detail (metrics, endpoints, …). Read more
Source§fn liveness_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProbeResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn liveness_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProbeResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Liveness probe (K2b-G2, os-patterns). Read more
Source§fn readiness_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProbeResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn readiness_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ProbeResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Readiness probe (K2b-G2, os-patterns). Read more
Auto Trait Implementations§
impl !Freeze for SpatialService
impl !RefUnwindSafe for SpatialService
impl !UnwindSafe for SpatialService
impl Send for SpatialService
impl Sync for SpatialService
impl Unpin for SpatialService
impl UnsafeUnpin for SpatialService
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
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 more