OpenVDB 12.1.0
Loading...
Searching...
No Matches
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.
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.

Typedef Documentation

◆ GroupIndexT

◆ TimerT

using TimerT = NoTimer

◆ WeightedPositionSumT

◆ WeightSumT

using WeightSumT = double

Function Documentation

◆ decomposeSymmetricMatrix()

template<typename Scalar>
bool 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

◆ descendingOrder()

template<typename Scalar>
Vec3i descendingOrder ( math::Vec3< Scalar > & vector)
inline

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

Parameters
vectorVector to sort

◆ initPcaArrayAttribute()

template<typename T, typename LeafNodeT>
T * initPcaArrayAttribute ( LeafNodeT & leaf,
const size_t idx,
const bool fill = true )
inline