plozone 0.1.1

3D spatial zone engine: geofencing, octree hole-scanning, realtime sync (WebSocket + QUIC + io_uring), voxel pathfinding, and AV sensor fusion.
Documentation
//! # Plozone
//!
//! High-precision 3D spatial zone management — 3D geofencing, octree-based
//! hole scanning, and adaptive density partitioning.
//!
//! This crate currently implements the no-feature **core**:
//!
//! - [`coord::EnuConverter`] — geodetic ⇄ ENU coordinate conversion (WGS84).
//! - [`zone`] — the [`zone::ZoneShape`] trait, the serializable [`zone::Zone`]
//!   enum, and several built-in custom shapes.
//! - [`octree::OctreeNode`] — adaptive-density octree for point clouds.
//! - [`store::ZoneStore`] — R-tree-indexed zone store working over both
//!   `Zone` and `dyn ZoneShape`.
//! - [`scan`] — octree hole scanner and scan modes.
//!
//! ```
//! use plozone::{coord::EnuConverter, store::ZoneStore, zone::{Zone, ZoneEntry}};
//!
//! let conv = EnuConverter::new(10.7626, 106.6601, 0.0);
//! let store = ZoneStore::from_entries(&[
//! ZoneEntry::new(1, Zone::Cylinder {
//!     center: [10.7626, 106.6601], radius_m: 50.0, z_min: 0.0, z_max: 20.0,
//! }),
//! ], &conv);
//!
//! let hits = store.query_geodetic(10.7626, 106.6601, 5.0, &conv);
//! assert_eq!(hits.as_slice(), &[1]);
//! ```

#[cfg(feature = "mimalloc")]
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

pub mod coord;
pub mod octree;
pub mod scan;
pub mod store;
pub mod zone;

#[cfg(feature = "game")]
pub mod game;
#[cfg(feature = "lidar")]
pub mod lidar;
#[cfg(feature = "net")]
pub mod net;
#[cfg(feature = "pathfinding")]
pub mod pathfinding;
#[cfg(feature = "terrain")]
pub mod terrain;
#[cfg(feature = "tiled")]
pub mod tiled;
#[cfg(feature = "pipeline")]
pub mod pipeline;
#[cfg(feature = "server")]
pub mod server;
#[cfg(feature = "server")]
pub mod client;
#[cfg(feature = "av")]
pub mod av;
#[cfg(feature = "embedded")]
pub mod embedded;
#[cfg(feature = "bevy")]
pub mod bevy_plugin;
#[cfg(feature = "gnss")]
pub mod gnss;
#[cfg(feature = "quic")]
pub mod quic;
#[cfg(feature = "lidar")]
pub mod rplidar;

pub use coord::{CoordSystem, EnuConverter};
pub use octree::{OctreeNode, depth_for_accuracy};
pub use scan::{Hole, ScanMode, ScanResult, run_scan, scan_holes, scan_holes_multiscale};
pub use store::{ZoneDiff, ZoneStore};
pub use zone::{Zone, ZoneBuilder, ZoneEntry, ZoneShape, zone_to_shape, validate_polygon, PolygonError, point_in_ring_enu};

#[cfg(feature = "game")]
pub use game::{
    Cartesian2D, ChunkKey, ChunkedGameWorld, DirectCartesian, GameWorld, LayeredMap, Portal,
    PortalSystem, ScaledCartesian, YUpCartesian,
};
#[cfg(feature = "lidar")]
pub use lidar::{Pose, Quat, ScanFrame, ingest_scan};
#[cfg(feature = "net")]
pub use net::{
    ClientMsg, CompactHole, NetworkTier, PosTracker, ServerMsg, ZoneEvent, decode, decode_snapshot,
    encode, encode_snapshot,
};
#[cfg(feature = "pathfinding")]
pub use pathfinding::{PathNode, find_path};
#[cfg(feature = "terrain")]
pub use terrain::{TriMesh, marching_cubes_export_density, to_obj, to_ply};
#[cfg(feature = "tiled")]
pub use tiled::{TileKey, TiledWorld, WorldTile, zone_geodetic_bbox};
#[cfg(feature = "pipeline")]
pub use pipeline::{Frame, PipelineConfig, SharedOctree, SharedStore, start_pipeline};
#[cfg(feature = "server")]
pub use server::{AtomicPos, ShardedZoneServer, ZoneServer};
#[cfg(feature = "server")]
pub use client::ZoneClient;
#[cfg(feature = "av")]
pub use av::{
    BehaviorZone, BehaviorZoneStore, CameraFrustumZone, EdgeKind, HdMap, ImuFusion,
    LaneEdge, LaneNode, LidarFovZone, PredictionZone, RadarSectorZone, SafetyAlert,
    SafetyEnvelope, SensorKind, TrafficBehavior, V2xBeacon, VehiclePose, safety_check,
};
#[cfg(feature = "embedded")]
pub use embedded::ZoneStoreEmbed;
#[cfg(feature = "bevy")]
pub use bevy_plugin::{
    SharedOctreeRes, SharedZoneStore, Spatial3dPlugin, ZoneEnterEvent, ZoneExitEvent, ZoneTracker,
    add_zone_to_store, insert_point,
};
#[cfg(feature = "gnss")]
pub use gnss::{GnssFix, ntrip_connect, open_ublox, read_fix};
#[cfg(feature = "quic")]
pub use quic::{QuicZoneServer, quic_connect};
#[cfg(feature = "lidar")]
pub use rplidar::{grab_scan, open_rplidar};
#[cfg(feature = "server")]
pub use server::run_io_uring;
#[cfg(feature = "server")]
pub use server::start_health_endpoint;
#[cfg(feature = "prometheus")]
pub use server::start_metrics_endpoint;