|
|
|
|
@ -113,6 +113,7 @@ pub struct PointXYZ {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
impl From<nalgebra::Point3<f32>> for PointXYZ {
|
|
|
|
|
fn from(point: nalgebra::Point3<f32>) -> Self {
|
|
|
|
|
Self {
|
|
|
|
|
@ -124,12 +125,73 @@ impl From<nalgebra::Point3<f32>> for PointXYZ {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
impl From<&nalgebra::Point3<f32>> for PointXYZ {
|
|
|
|
|
fn from(point: &nalgebra::Point3<f32>) -> Self {
|
|
|
|
|
Self {
|
|
|
|
|
x: point.x,
|
|
|
|
|
y: point.y,
|
|
|
|
|
z: point.z,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
impl From<nalgebra::Point3<f64>> for PointXYZ {
|
|
|
|
|
fn from(point: nalgebra::Point3<f64>) -> Self {
|
|
|
|
|
Self {
|
|
|
|
|
x: point.x as f32,
|
|
|
|
|
y: point.y as f32,
|
|
|
|
|
z: point.z as f32,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
impl From<&nalgebra::Point3<f64>> for PointXYZ {
|
|
|
|
|
fn from(point: &nalgebra::Point3<f64>) -> Self {
|
|
|
|
|
Self {
|
|
|
|
|
x: point.x as f32,
|
|
|
|
|
y: point.y as f32,
|
|
|
|
|
z: point.z as f32,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
impl From<PointXYZ> for nalgebra::Point3<f32> {
|
|
|
|
|
fn from(point: PointXYZ) -> Self {
|
|
|
|
|
nalgebra::Point3::new(point.x, point.y, point.z)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
impl From<&PointXYZ> for nalgebra::Point3<f32> {
|
|
|
|
|
fn from(point: &PointXYZ) -> Self {
|
|
|
|
|
nalgebra::Point3::new(point.x, point.y, point.z)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
impl From<PointXYZ> for nalgebra::Point3<f64> {
|
|
|
|
|
fn from(point: PointXYZ) -> Self {
|
|
|
|
|
nalgebra::Point3::new(point.x as f64, point.y as f64, point.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
impl From<&PointXYZ> for nalgebra::Point3<f64> {
|
|
|
|
|
fn from(point: &PointXYZ) -> Self {
|
|
|
|
|
nalgebra::Point3::new(point.x as f64, point.y as f64, point.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl PointXYZ {
|
|
|
|
|
#[must_use]
|
|
|
|
|
pub fn new(x: f32, y: f32, z: f32) -> Self {
|
|
|
|
|
@ -138,9 +200,22 @@ impl PointXYZ {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.into()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
self.into()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -187,10 +262,23 @@ impl PointXYZI {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
nalgebra::Point3::new(self.x as f64, self.y as f64, self.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsafe impl Send for PointXYZI {}
|
|
|
|
|
@ -247,10 +335,23 @@ impl PointXYZL {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
nalgebra::Point3::new(self.x as f64, self.y as f64, self.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsafe impl Send for PointXYZL {}
|
|
|
|
|
@ -324,10 +425,23 @@ impl PointXYZRGB {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
nalgebra::Point3::new(self.x as f64, self.y as f64, self.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsafe impl Send for PointXYZRGB {}
|
|
|
|
|
@ -403,10 +517,23 @@ impl PointXYZRGBA {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
nalgebra::Point3::new(self.x as f64, self.y as f64, self.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsafe impl Send for PointXYZRGBA {}
|
|
|
|
|
@ -502,10 +629,23 @@ impl PointXYZRGBNormal {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
nalgebra::Point3::new(self.x as f64, self.y as f64, self.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsafe impl Send for PointXYZRGBNormal {}
|
|
|
|
|
@ -592,10 +732,23 @@ impl PointXYZINormal {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
nalgebra::Point3::new(self.x as f64, self.y as f64, self.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsafe impl Send for PointXYZINormal {}
|
|
|
|
|
@ -689,10 +842,23 @@ impl PointXYZRGBL {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
nalgebra::Point3::new(self.x as f64, self.y as f64, self.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl From<RPCL2Point<5>> for PointXYZRGBL {
|
|
|
|
|
@ -760,10 +926,23 @@ impl PointXYZNormal {
|
|
|
|
|
|
|
|
|
|
/// Get the coordinates as a nalgebra Point3.
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[deprecated(since = "0.5.2", note = "please use `xyz_f32` instead")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
self.xyz_f32()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f32(&self) -> nalgebra::Point3<f32> {
|
|
|
|
|
nalgebra::Point3::new(self.x, self.y, self.z)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "nalgebra")]
|
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "nalgebra")))]
|
|
|
|
|
pub fn xyz_f64(&self) -> nalgebra::Point3<f64> {
|
|
|
|
|
nalgebra::Point3::new(self.x as f64, self.y as f64, self.z as f64)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
unsafe impl Send for PointXYZNormal {}
|
|
|
|
|
|