pub trait Bearing {
// Required methods
fn bearing_unnormalized(&self) -> Vector3<f64>;
fn from_bearing_vector(bearing: Vector3<f64>) -> Self;
// Provided methods
fn bearing(&self) -> Unit<Vector3<f64>> { ... }
fn from_bearing_unit_vector(bearing: Unit<Vector3<f64>>) -> Self
where Self: Sized { ... }
}
Expand description
Describes the direction that the projection onto the camera’s optical center
came from. It is implemented on projection items from different camera models.
It is also implemented for Unit<Vector3<f64>>
if you want to pre-compute the
normalized bearings for efficiency or to turn all camera models into a unified type.
Required Methods§
Sourcefn bearing_unnormalized(&self) -> Vector3<f64>
fn bearing_unnormalized(&self) -> Vector3<f64>
Returns the unnormalized bearing which has direction point towards the direction that the signal entered the camera’s center. The magnitude of this vector is unknown. Use this if you are sure that you do not need a normalized bearing. This may be faster.
Sourcefn from_bearing_vector(bearing: Vector3<f64>) -> Self
fn from_bearing_vector(bearing: Vector3<f64>) -> Self
Converts a bearing vector back into this bearing type.
This is useful if you would like to go backwards from reconstruction space to image space.
See CameraModel::uncalibrate
for how to then convert the camera bearing into image coordinates.
Provided Methods§
Sourcefn bearing(&self) -> Unit<Vector3<f64>>
fn bearing(&self) -> Unit<Vector3<f64>>
Returns a unit vector of the direction that the projection created by the feature projects out of the optical center of the camera. This is defined as the the position delta of the feature from the optical center of the camera.
Sourcefn from_bearing_unit_vector(bearing: Unit<Vector3<f64>>) -> Selfwhere
Self: Sized,
fn from_bearing_unit_vector(bearing: Unit<Vector3<f64>>) -> Selfwhere
Self: Sized,
Converts a bearing unit vector back into this bearing type.
This is useful if you would like to go backwards from reconstruction space to image space.
See CameraModel::uncalibrate
for how to then convert the camera bearing into image coordinates.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.