OpenVDB  12.1.0
Classes | Typedefs | Functions
openvdb::v12_1::points::pca_internal Namespace Reference

Classes

struct  AttrIndices
 
struct  CovarianceTransfer
 
struct  NoTimer
 
struct  PcaTimer
 
struct  PcaTransfer
 
struct  WeightPosSumsTransfer
 

Typedefs

using TimerT = NoTimer
 
using WeightSumT = double
 
using WeightedPositionSumT = Vec3d
 
using GroupIndexT = points::AttributeSet::Descriptor::GroupIndex
 

Functions

template<typename T , typename LeafNodeT >
T * initPcaArrayAttribute (LeafNodeT &leaf, const size_t idx, const bool fill=true)
 
template<typename Scalar >
Vec3i descendingOrder (math::Vec3< Scalar > &vector)
 Sort a vector into descending order and output a vector of the resulting order. More...
 
template<typename Scalar >
bool decomposeSymmetricMatrix (const math::Mat3< Scalar > &mat, math::Mat3< Scalar > &U, math::Vec3< Scalar > &sigma)
 Decomposes a symmetric matrix into its eigenvalues and a rotation matrix of eigenvectors. Note that if mat is positive-definite, this will be equivalent to a singular value decomposition where V = U. More...
 

Typedef Documentation

using GroupIndexT = points::AttributeSet::Descriptor::GroupIndex
using TimerT = NoTimer
using WeightedPositionSumT = Vec3d
using WeightSumT = double

Function Documentation

bool openvdb::v12_1::points::pca_internal::decomposeSymmetricMatrix ( const math::Mat3< Scalar > &  mat,
math::Mat3< Scalar > &  U,
math::Vec3< Scalar > &  sigma 
)
inline

Decomposes a symmetric matrix into its eigenvalues and a rotation matrix of eigenvectors. Note that if mat is positive-definite, this will be equivalent to a singular value decomposition where V = U.

Parameters
matMatrix to decompose
Urotation matrix. The order of its columns (which will be eigenvectors) will match the eigenvalues in sigma
sigmavector of eigenvalues
Vec3i openvdb::v12_1::points::pca_internal::descendingOrder ( math::Vec3< Scalar > &  vector)
inline

Sort a vector into descending order and output a vector of the resulting order.

Parameters
vectorVector to sort
T* openvdb::v12_1::points::pca_internal::initPcaArrayAttribute ( LeafNodeT &  leaf,
const size_t  idx,
const bool  fill = true 
)
inline