Class GaussianAccumulatorS2

Inheritance Relationships

Base Type

Class Documentation

class GaussianAccumulatorS2 : public FastGA::GaussianAccumulator<uint64_t>

This GaussianAccumulator can handle the entire sphere by using a space filling curve designed by Google’s S2 Geometry library. It projects a sphere to the faces of a cube and creates six separate hilbert curves for each face. It then stitches these curves together into one continuous thread. This class does not need S2 Geometry Library. We are using a port callsed s2nano that pulls out the essential SFC routine.

It basically works by converting a normal to being integrated into a s2_id (SFC unique integer). It performs a faster interpolated and branchless binary search to find the closest cell in buckets. It then performs a local neighborhood search centered around the cell which actually looks at the surface normal.

Public Functions

GaussianAccumulatorS2(const int level = 1, const double max_phi = 180.0)

Construct a new Gaussian Accumulator S2 object.

Parameters
  • level: The refinement level. Iterations of recursive subdivision.

  • max_phi: Latitude degrees from north pole to south pole to include cells in the mesh. Leave at default which includes all of the mesh.

std::vector<size_t> Integrate(const MatX3d &normals, const int num_nbr = 12)

Integrates a list of normals into the histogram.

Return

std::vector<size_t>

Parameters
  • normals: The unit normals to integrate

  • num_nbr: The number of neighbors to search during local neighborhood search. Leave at default.

Public Members

std::vector<uint64_t> bucket_hv

Sorted list of space filling curves values for each bucket.

MatX12I bucket_neighbors

A NX12 matrix that contains the indices for each triangle neighbor.

Protected Attributes

Regression regression

A regressed line that aids to speed up sorted integer search inside bucket_hv.