pub struct Scene {
pub kind: SceneKind,
pub params: SceneParams,
pub points: Vec<Vector3<f64>>,
pub cloud: PointCloud,
pub normals: Vec<Vector3<f64>>,
pub inlier_count: usize,
}Expand description
A generated scene.
Fields§
§kind: SceneKindWhich surface.
params: SceneParamsThe parameters it was built with.
points: Vec<Vector3<f64>>Exact point coordinates in f64.
The scene is a mathematical object; the cloud is its in-memory
representation. Keeping them apart is mandatory, because f32
storage destroys exact identities on curved surfaces. On a cylinder
(p × n)_z is identically zero, yet after quantisation it becomes
about 3·10⁻⁸ of the scene scale. Analytical claims are checked
against this field; all processing runs on cloud.
cloud: PointCloudThe points in working form: f32 relative to an origin.
normals: Vec<Vector3<f64>>The exact analytical normal at each point.
Analytical, not estimated from neighbours: normal-estimation error is a separate source of inaccuracy and must not be mixed into geometric degeneracy.
inlier_count: usizeThe first inlier_count points lie on the surface; the rest are
outliers.
The null-space guarantee applies to inliers only: an outlier is not on the surface, and the declared vector does not annihilate its Jacobian row.
Implementations§
Source§impl Scene
impl Scene
Sourcepub fn generate(kind: SceneKind, params: SceneParams) -> Self
pub fn generate(kind: SceneKind, params: SceneParams) -> Self
Builds the scene.
Sourcepub fn nullspace_dimension(&self) -> usize
pub fn nullspace_dimension(&self) -> usize
Dimension of the null space.
Sourcepub fn split_with_overlap(
&self,
overlap: f64,
seed: u64,
) -> (PointCloud, PointCloud)
pub fn split_with_overlap( &self, overlap: f64, seed: u64, ) -> (PointCloud, PointCloud)
Splits the scene into two partially overlapping clouds.
A fraction overlap of the points goes into both clouds; the rest
is divided evenly. Needed for source/target pairs in registration:
full overlap is an unrealistic and far too easy case.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scene
impl RefUnwindSafe for Scene
impl Send for Scene
impl Sync for Scene
impl Unpin for Scene
impl UnsafeUnpin for Scene
impl UnwindSafe for Scene
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.