pub enum Gaussians {
Internal(Vec<Gaussian>),
Ply(PlyGaussians),
Spz(SpzGaussians),
}Expand description
A unified Gaussian representation.
Gaussians::Internal variant contains Gaussians in the Gaussian format, which is the one
converted to GaussianPod directly.
Other variants contain Gaussians in their respective source file formats.
Variants§
Implementations§
Source§impl Gaussians
impl Gaussians
Sourcepub fn from_gaussians_iter(
iter: impl Iterator<Item = Gaussian>,
source: GaussiansSource,
) -> Self
pub fn from_gaussians_iter( iter: impl Iterator<Item = Gaussian>, source: GaussiansSource, ) -> Self
Create a collection of Gaussians from an iterator of Gaussian with the given source.
Sourcepub fn source(&self) -> GaussiansSource
pub fn source(&self) -> GaussiansSource
Get the source representation of the Gaussians.
Sourcepub fn read_from_file(
path: impl AsRef<Path>,
source: GaussiansSource,
) -> Result<Self>
pub fn read_from_file( path: impl AsRef<Path>, source: GaussiansSource, ) -> Result<Self>
Read from a file with the given source.
Sourcepub fn read_from(
reader: &mut impl BufRead,
source: GaussiansSource,
) -> Result<Self>
pub fn read_from( reader: &mut impl BufRead, source: GaussiansSource, ) -> Result<Self>
Read from a buffer with the given source.
Trait Implementations§
Source§impl From<&Gaussians> for GaussiansSource
impl From<&Gaussians> for GaussiansSource
Source§impl From<PlyGaussians> for Gaussians
impl From<PlyGaussians> for Gaussians
Source§fn from(value: PlyGaussians) -> Self
fn from(value: PlyGaussians) -> Self
Converts to this type from the input type.
Source§impl From<SpzGaussians> for Gaussians
impl From<SpzGaussians> for Gaussians
Source§fn from(value: SpzGaussians) -> Self
fn from(value: SpzGaussians) -> Self
Converts to this type from the input type.
Source§impl FromIterator<Gaussian> for Gaussians
impl FromIterator<Gaussian> for Gaussians
Source§impl IterGaussian for Gaussians
impl IterGaussian for Gaussians
Source§fn iter_gaussian(&self) -> impl ExactSizeIterator<Item = Gaussian> + '_
fn iter_gaussian(&self) -> impl ExactSizeIterator<Item = Gaussian> + '_
Iterate over
Gaussian.impl StructuralPartialEq for Gaussians
Auto Trait Implementations§
impl Freeze for Gaussians
impl RefUnwindSafe for Gaussians
impl Send for Gaussians
impl Sync for Gaussians
impl Unpin for Gaussians
impl UnwindSafe for Gaussians
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§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>
Converts
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>
Converts
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 more