bundle.gs3d.generators.primitives¶
Procedural primitive generators: sphere, cube, torus, random cloud.
Each generator allocates a GaussianCloudArrays of the requested
size and fills the position, scale, rotation, opacity, and SH DC channels.
SH degrees > 0 leave the higher-order f_rest_* coefficients zero — view-
dependent appearance is opt-in for synthetic content.
Colours are written into the SH DC term using the same constant the
inria-graphdeco reference uses (C0 = 0.28209479177387814), so a
DC value of (c - 0.5) / C0 reproduces a constant linear colour c.
Attributes¶
Classes¶
Gaussians distributed uniformly on (or in) a sphere. |
|
Gaussians inside (or on the surface of) an axis-aligned cube. |
|
Gaussians on a torus surface in the XY plane. |
|
Uniform random Gaussians inside an axis-aligned bounding box. |
Module Contents¶
- bundle.gs3d.generators.primitives.log¶
- bundle.gs3d.generators.primitives.SH_C0 = 0.28209479177387814¶
- class bundle.gs3d.generators.primitives.SphereGenerator(/, **data: Any)[source]¶
Bases:
bundle.gs3d.generators.base.GeneratorGaussians distributed uniformly on (or in) a sphere.
- radius¶
Sphere radius.
- center¶
Sphere centre in world space.
- surface¶
When
Truesamples lie on the surface; otherwise inside.
- async generate() bundle.gs3d.ply.GaussianCloudArrays[source]¶
Produce a
GaussianCloudArraysfrom this generator’s parameters.
- class bundle.gs3d.generators.primitives.CubeGenerator(/, **data: Any)[source]¶
Bases:
bundle.gs3d.generators.base.GeneratorGaussians inside (or on the surface of) an axis-aligned cube.
- size¶
Edge length.
- center¶
Cube centre.
- surface¶
When
Truesamples lie on the six faces; otherwise inside.
- async generate() bundle.gs3d.ply.GaussianCloudArrays[source]¶
Produce a
GaussianCloudArraysfrom this generator’s parameters.
- class bundle.gs3d.generators.primitives.TorusGenerator(/, **data: Any)[source]¶
Bases:
bundle.gs3d.generators.base.GeneratorGaussians on a torus surface in the XY plane.
- major_radius¶
Distance from torus centre to tube centre (R).
- minor_radius¶
Tube radius (r).
- center¶
Torus centre.
- async generate() bundle.gs3d.ply.GaussianCloudArrays[source]¶
Produce a
GaussianCloudArraysfrom this generator’s parameters.
- class bundle.gs3d.generators.primitives.RandomCloudGenerator(/, **data: Any)[source]¶
Bases:
bundle.gs3d.generators.base.GeneratorUniform random Gaussians inside an axis-aligned bounding box.
- bounds_min¶
Lower corner of the sampling box.
- bounds_max¶
Upper corner.
- async generate() bundle.gs3d.ply.GaussianCloudArrays[source]¶
Produce a
GaussianCloudArraysfrom this generator’s parameters.