pub struct NodeTemporalEntry {
pub key: VoxelKey,
/* private fields */
}Expand description
Per-node temporal data: a set of sampled GPS timestamps.
Fields§
§key: VoxelKeyThe octree node this entry describes.
Implementations§
Source§impl NodeTemporalEntry
impl NodeTemporalEntry
Sourcepub fn new(key: VoxelKey, samples: Vec<GpsTime>) -> Self
pub fn new(key: VoxelKey, samples: Vec<GpsTime>) -> Self
Create a new entry with the given key and samples.
§Panics
Panics if samples is empty — every node must have at least one sample.
Sourcepub fn time_range(&self) -> (GpsTime, GpsTime)
pub fn time_range(&self) -> (GpsTime, GpsTime)
Returns (min_time, max_time) for this node.
Sourcepub fn overlaps(&self, start: GpsTime, end: GpsTime) -> bool
pub fn overlaps(&self, start: GpsTime, end: GpsTime) -> bool
Returns true if this node may contain points in [start, end].
Sourcepub fn estimate_point_range(
&self,
start: GpsTime,
end: GpsTime,
stride: u32,
point_count: u32,
) -> Range<u32>
pub fn estimate_point_range( &self, start: GpsTime, end: GpsTime, stride: u32, point_count: u32, ) -> Range<u32>
Estimate the point index range within the decompressed chunk for a time range.
Implements the binary search logic from spec section 8.2:
- Find first sample index
iwheresamples[i] >= t_start - Find last sample index
jwheresamples[j] <= t_end - Start point = i * stride
- End point = min(j * stride + stride - 1, point_count - 1)
Trait Implementations§
Source§impl Clone for NodeTemporalEntry
impl Clone for NodeTemporalEntry
Source§fn clone(&self) -> NodeTemporalEntry
fn clone(&self) -> NodeTemporalEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NodeTemporalEntry
impl RefUnwindSafe for NodeTemporalEntry
impl Send for NodeTemporalEntry
impl Sync for NodeTemporalEntry
impl Unpin for NodeTemporalEntry
impl UnsafeUnpin for NodeTemporalEntry
impl UnwindSafe for NodeTemporalEntry
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