Trait cv_core::Projective [−][src]
pub trait Projective: From<Vector4<f64>> + Clone + Copy {
fn homogeneous(self) -> Vector4<f64>;
fn point(self) -> Option<Point3<f64>> { ... }
fn from_point(point: Point3<f64>) -> Self { ... }
fn bearing(self) -> Unit<Vector3<f64>> { ... }
fn bearing_unnormalized(self) -> Vector3<f64> { ... }
}
Expand description
This trait is implemented for homogeneous projective 3d coordinate.
Required methods
fn homogeneous(self) -> Vector4<f64>
fn homogeneous(self) -> Vector4<f64>
Retrieve the homogeneous vector.
No constraints are put on this vector. All components can move freely and it is not normalized. However, this vector may be normalized if desired and it will still be equivalent to the original. You may wish to normalize it if you want to avoid floating point precision issues, for instance.
Provided methods
Retrieve the euclidean 3d point by normalizing the homogeneous coordinate.
This may fail, as a homogeneous coordinate can exist at near-infinity (like a star in the sky), whereas a 3d euclidean point cannot (it would overflow).
fn from_point(point: Point3<f64>) -> Self
fn from_point(point: Point3<f64>) -> Self
Convert the euclidean 3d point into homogeneous coordinates.
fn bearing_unnormalized(self) -> Vector3<f64>
fn bearing_unnormalized(self) -> Vector3<f64>
Retrieve the unnormalized bearing of the coordinate.
Use this when you know that you do not need the bearing to be normalized,
and it may increase performance. Otherwise use Projective::bearing
.