Skip to main content

PreparedTRAStarWaypointDatabaseFixedDemotionRule

Struct PreparedTRAStarWaypointDatabaseFixedDemotionRule 

Source
pub struct PreparedTRAStarWaypointDatabaseFixedDemotionRule { /* private fields */ }
Expand description

Prepared TRA* that demotes protected midpoints under a fixed overflow policy.

Protected overflow evicts the least-recent protected entry rather than demoting to probation.

Implementations§

Source§

impl PreparedTRAStarWaypointDatabaseFixedDemotionRule

Source

pub fn builder() -> TRAStarWaypointDatabaseFixedDemotionRuleBuilder

Returns a TRAStarWaypointDatabaseFixedDemotionRuleBuilder for preprocess entry.

Source

pub fn prepared_tra_star(&self) -> &PreparedTRAStar

Underlying base TRA* prepared surface.

Source

pub fn admission_cost_threshold(&self) -> f64

Minimum portal segment cost required to retain a midpoint in cache.

Source

pub fn promotion_hits_required(&self) -> usize

Probation hits required before promoting into the protected tier.

Source

pub fn eviction_capacity(&self) -> usize

Total midpoint capacity before eviction.

Source

pub fn protected_segment_capacity(&self) -> usize

Capacity reserved for the protected segment.

Source

pub fn retained_waypoint_count(&self) -> usize

Midpoints currently retained under the demotion rule.

Source

pub fn retained_probation_count(&self) -> usize

Midpoints currently in probation.

Source

pub fn retained_protected_count(&self) -> usize

Midpoints currently in the protected segment.

Source

pub fn search(&self, query: NavmeshQuery) -> NavmeshSearchResult

Routes while applying fixed demotion on protected overflow.

Trait Implementations§

Source§

impl Debug for PreparedTRAStarWaypointDatabaseFixedDemotionRule

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PreparedNavmesh for PreparedTRAStarWaypointDatabaseFixedDemotionRule

Source§

fn name(&self) -> &'static str

Stable prepared-map name (usually the builder name).
Source§

fn navmesh(&self) -> &Navmesh

Owned static mesh snapshot this preparation was built from.
Source§

fn neighbors(&self, cell_index: usize) -> Option<&[usize]>

Indexed neighbor cell list for cell_index, or None if out of range.
Source§

fn portals_from(&self, cell_index: usize) -> Option<&[NavmeshPortal]>

Indexed portals incident to cell_index, or None if out of range.
Source§

fn portal_between( &self, left_cell: usize, right_cell: usize, ) -> Option<NavmeshPortal>

Portal joining two cells when one was recorded at preprocess time. Read more
Source§

fn locate_point(&self, point: Point2) -> Option<usize>

First cell containing point; see Navmesh::locate_point.
Source§

fn locate_cells(&self, point: Point2) -> Vec<usize>

All cells containing point; see Navmesh::locate_cells.
Source§

fn query(&self, query: NavmeshQuery) -> NavmeshQueryResult

Cell-graph connectivity for query; see Navmesh::query.
Source§

fn cells_connected(&self, start_cell: usize, goal_cell: usize) -> bool

BFS over prepared neighbors: whether start_cell can reach goal_cell. Read more
Source§

fn materialize_corridor( &self, start: Point2, goal: Point2, cells: &[usize], ) -> Option<NavmeshCorridor>

Builds a NavmeshCorridor for a known cell sequence using the owned mesh portals. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.