pub struct Gaussian {
pub rot: Quat,
pub pos: Vec3,
pub color: U8Vec4,
pub sh: [Vec3; 15],
pub scale: Vec3,
}Expand description
The Gaussian.
This is an intermediate representation used by the CPU to convert to
GaussianPod.
Fields§
§rot: Quat§pos: Vec3§color: U8Vec4§sh: [Vec3; 15]§scale: Vec3Implementations§
Source§impl Gaussian
impl Gaussian
Sourcepub const SH0_TO_LINEAR_FACTOR: f32 = 0.282094806f32
pub const SH0_TO_LINEAR_FACTOR: f32 = 0.282094806f32
The constant to convert from SH coefficient at degree 0 to linear color.
Sourcepub const SPZ_SH0_TO_LINEAR_FACTOR: f32 = 0.150000006f32
pub const SPZ_SH0_TO_LINEAR_FACTOR: f32 = 0.150000006f32
The constant to convert from SH coefficient at degree 0 to linear color in SPZ.
Sourcepub fn from_ply(ply: &PlyGaussianPod) -> Self
pub fn from_ply(ply: &PlyGaussianPod) -> Self
Convert from PlyGaussianPod.
Sourcepub fn to_ply(&self) -> PlyGaussianPod
pub fn to_ply(&self) -> PlyGaussianPod
Convert to PlyGaussianPod.
Sourcepub fn from_spz(spz: SpzGaussianRef<'_>, header: &SpzGaussiansHeader) -> Self
pub fn from_spz(spz: SpzGaussianRef<'_>, header: &SpzGaussiansHeader) -> Self
Convert from SpzGaussianRef.
Sourcepub fn to_spz(
&self,
header: &SpzGaussiansHeader,
options: &GaussianToSpzOptions,
) -> SpzGaussian
pub fn to_spz( &self, header: &SpzGaussiansHeader, options: &GaussianToSpzOptions, ) -> SpzGaussian
Convert to SpzGaussian.
User usually don’t need to call this directly due to the overhead of constructing a
valid SpzGaussiansHeader. Instead, use one of the following methods to convert a
collection of Gaussian to SpzGaussians properly:
Trait Implementations§
Source§impl From<&Gaussian> for PlyGaussianPod
impl From<&Gaussian> for PlyGaussianPod
Source§impl From<Gaussian> for PlyGaussianPod
impl From<Gaussian> for PlyGaussianPod
Source§impl From<GaussianPodWithShHalfCov3dHalfConfigs> for Gaussian
impl From<GaussianPodWithShHalfCov3dHalfConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShHalfCov3dHalfConfigs) -> Self
fn from(pod: GaussianPodWithShHalfCov3dHalfConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShHalfCov3dRotScaleConfigs> for Gaussian
impl From<GaussianPodWithShHalfCov3dRotScaleConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShHalfCov3dRotScaleConfigs) -> Self
fn from(pod: GaussianPodWithShHalfCov3dRotScaleConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShHalfCov3dSingleConfigs> for Gaussian
impl From<GaussianPodWithShHalfCov3dSingleConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShHalfCov3dSingleConfigs) -> Self
fn from(pod: GaussianPodWithShHalfCov3dSingleConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShNoneCov3dHalfConfigs> for Gaussian
impl From<GaussianPodWithShNoneCov3dHalfConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShNoneCov3dHalfConfigs) -> Self
fn from(pod: GaussianPodWithShNoneCov3dHalfConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShNoneCov3dRotScaleConfigs> for Gaussian
impl From<GaussianPodWithShNoneCov3dRotScaleConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShNoneCov3dRotScaleConfigs) -> Self
fn from(pod: GaussianPodWithShNoneCov3dRotScaleConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShNoneCov3dSingleConfigs> for Gaussian
impl From<GaussianPodWithShNoneCov3dSingleConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShNoneCov3dSingleConfigs) -> Self
fn from(pod: GaussianPodWithShNoneCov3dSingleConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShNorm8Cov3dHalfConfigs> for Gaussian
impl From<GaussianPodWithShNorm8Cov3dHalfConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShNorm8Cov3dHalfConfigs) -> Self
fn from(pod: GaussianPodWithShNorm8Cov3dHalfConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShNorm8Cov3dRotScaleConfigs> for Gaussian
impl From<GaussianPodWithShNorm8Cov3dRotScaleConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShNorm8Cov3dRotScaleConfigs) -> Self
fn from(pod: GaussianPodWithShNorm8Cov3dRotScaleConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShNorm8Cov3dSingleConfigs> for Gaussian
impl From<GaussianPodWithShNorm8Cov3dSingleConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShNorm8Cov3dSingleConfigs) -> Self
fn from(pod: GaussianPodWithShNorm8Cov3dSingleConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShSingleCov3dHalfConfigs> for Gaussian
impl From<GaussianPodWithShSingleCov3dHalfConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShSingleCov3dHalfConfigs) -> Self
fn from(pod: GaussianPodWithShSingleCov3dHalfConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShSingleCov3dRotScaleConfigs> for Gaussian
impl From<GaussianPodWithShSingleCov3dRotScaleConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShSingleCov3dRotScaleConfigs) -> Self
fn from(pod: GaussianPodWithShSingleCov3dRotScaleConfigs) -> Self
Converts to this type from the input type.
Source§impl From<GaussianPodWithShSingleCov3dSingleConfigs> for Gaussian
impl From<GaussianPodWithShSingleCov3dSingleConfigs> for Gaussian
Source§fn from(pod: GaussianPodWithShSingleCov3dSingleConfigs) -> Self
fn from(pod: GaussianPodWithShSingleCov3dSingleConfigs) -> Self
Converts to this type from the input type.
Source§impl FromIterator<Gaussian> for Gaussians
impl FromIterator<Gaussian> for Gaussians
impl Copy for Gaussian
impl StructuralPartialEq for Gaussian
Auto Trait Implementations§
impl Freeze for Gaussian
impl RefUnwindSafe for Gaussian
impl Send for Gaussian
impl Sync for Gaussian
impl Unpin for Gaussian
impl UnwindSafe for Gaussian
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