iridescence
Loading...
Searching...
No Matches
glk::NormalDistributions Class Reference

A drawable class to render a set of normal distributions as ellipsoids. This class efficiently perform ellipsoids mesh generation using GLSL compute shader and is much faster than the old implementation. More...

#include <normal_distributions.hpp>

Inheritance diagram for glk::NormalDistributions:
Collaboration diagram for glk::NormalDistributions:

Public Member Functions

 NormalDistributions (const float *means, const float *covs, int num_points, float sigma=1.0f)
 Constructor.
template<typename T, int D>
 NormalDistributions (const Eigen::Matrix< T, D, 1 > *means, const Eigen::Matrix< T, D, D > *covs, int num_points, float sigma=1.0f)
 Constructor.
template<typename T, int D, template< class > class Allocator>
 NormalDistributions (const std::vector< Eigen::Matrix< T, D, 1 >, Allocator< Eigen::Matrix< T, D, 1 > > > &means, const std::vector< Eigen::Matrix< T, D, D >, Allocator< Eigen::Matrix< T, D, D > > > &covs, float sigma=1.0f)
 Constructor.
virtual ~NormalDistributions ()
virtual void draw (glk::GLSLShader &shader) const override
Public Member Functions inherited from glk::Drawable
virtual ~Drawable ()

Additional Inherited Members

Public Types inherited from glk::Drawable
using Ptr = std::shared_ptr<Drawable>
using ConstPtr = std::shared_ptr<const Drawable>

Detailed Description

A drawable class to render a set of normal distributions as ellipsoids. This class efficiently perform ellipsoids mesh generation using GLSL compute shader and is much faster than the old implementation.

Constructor & Destructor Documentation

◆ NormalDistributions() [1/3]

glk::NormalDistributions::NormalDistributions ( const float * means,
const float * covs,
int num_points,
float sigma = 1.0f )

Constructor.

Parameters
meansMeans (4D vector). The 4th element is ignored.
covsCovariances (4x4 matrix). The last row and column are ignored.
num_pointsNumber of normal distributions to render.
sigmaSize of the ellipsoids in standard deviations (e.g., 3.0 renders 3-sigma ellipsoids).

◆ NormalDistributions() [2/3]

template<typename T, int D>
glk::NormalDistributions::NormalDistributions ( const Eigen::Matrix< T, D, 1 > * means,
const Eigen::Matrix< T, D, D > * covs,
int num_points,
float sigma = 1.0f )

Constructor.

Note
Only T = float/double and D = 3/4 are supported. For D = 4, the 4th element of means and the last row and column of covs are ignored.
Parameters
meansMeans
covsCovariances
num_pointsNumber of normal distributions to render.
sigmaSize of the ellipsoids in standard deviations (e.g., 3.0 renders 3-sigma ellipsoids).

◆ NormalDistributions() [3/3]

template<typename T, int D, template< class > class Allocator>
glk::NormalDistributions::NormalDistributions ( const std::vector< Eigen::Matrix< T, D, 1 >, Allocator< Eigen::Matrix< T, D, 1 > > > & means,
const std::vector< Eigen::Matrix< T, D, D >, Allocator< Eigen::Matrix< T, D, D > > > & covs,
float sigma = 1.0f )
inline

Constructor.

Note
Only T = float/double and D = 3/4 are supported. For D = 4, the 4th element of means and the last row and column of covs are ignored.
Parameters
meansMeans
covsCovariances (must have the same size as means)
sigmaSize of the ellipsoids in standard deviations (e.g., 3.0 renders 3-sigma ellipsoids).

◆ ~NormalDistributions()

virtual glk::NormalDistributions::~NormalDistributions ( )
virtual

Member Function Documentation

◆ draw()

virtual void glk::NormalDistributions::draw ( glk::GLSLShader & shader) const
overridevirtual

Reimplemented from glk::Drawable.


The documentation for this class was generated from the following file: