Struct spatial_hasher::Point3D
source · pub struct Point3D {
pub x: f64,
pub y: f64,
pub z: f64,
}
Expand description
Represents a point in 3D space with floating-point coordinates.
The Point3D
struct defines a point in three-dimensional space using x
, y
, and z
coordinates.
§Examples
use spatial_hasher::Point3D;
let point = Point3D { x: 1.0, y: 2.0, z: 3.0 };
Fields§
§x: f64
§y: f64
§z: f64
Trait Implementations§
source§impl<'de> Deserialize<'de> for Point3D
impl<'de> Deserialize<'de> for Point3D
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for Point3D
impl Hash for Point3D
source§fn hash<H: Hasher>(&self, state: &mut H)
fn hash<H: Hasher>(&self, state: &mut H)
Hashes the Point3D
by writing the bit representations of its coordinates into the provided hasher.
This method uses the to_bits()
function to obtain the raw memory representation of the floating-point numbers, ensuring consistent hashing.
§Arguments
state
- A mutable reference to a type implementing theHasher
trait.
impl Copy for Point3D
Auto Trait Implementations§
impl Freeze for Point3D
impl RefUnwindSafe for Point3D
impl Send for Point3D
impl Sync for Point3D
impl Unpin for Point3D
impl UnwindSafe for Point3D
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)