OpenVDB 12.1.0

Loading...
Searching...
No Matches
openvdb::v12_1::math Namespace Reference

## Namespaces
namespace | mat3_internal
namespace | pcg

## Classes
class | AffineMap
| A general linear transform using homogeneous coordinates to perform rotation, scaling, shear and translation. More...
class | BaseStencil
class | BBox
| Axis-aligned bounding box. More...
struct | BIAS_SCHEME
struct | BIAS_SCHEME< FIRST_BIAS >
struct | BIAS_SCHEME< HJWENO5_BIAS >
struct | BIAS_SCHEME< SECOND_BIAS >
struct | BIAS_SCHEME< THIRD_BIAS >
struct | BIAS_SCHEME< WENO5_BIAS >
class | BoxStencil
class | CompoundMap
| Creates the composition of two maps, each of which could be a composition. In the case that each component of the composition classified as linear an acceleration AffineMap is stored. More...
struct | Conversion
| Dummy class for tag dispatch of conversion constructors. More...
class | Coord
| Signed (x, y, z) 32-bit integer coordinates. More...
class | CoordBBox
| Axis-aligned bounding box of signed integer coordinates. More...
struct | CPT
| Compute the closest-point transform to a level set. More...
struct | CPT_RANGE
| Compute the closest-point transform to a level set. More...
struct | Curl
| Compute the curl of a vector-valued grid using differencing of various orders in the space defined by the range of the map. More...
struct | Curl< UniformScaleMap, CD_2ND >
| Full template specialization of Curl. More...
struct | Curl< UniformScaleMap, DiffScheme >
| Partial template specialization of Curl. More...
struct | Curl< UniformScaleTranslateMap, CD_2ND >
| Full template specialization of Curl. More...
struct | Curl< UniformScaleTranslateMap, DiffScheme >
| Partial template specialization of Curl. More...
class | CurvatureStencil
struct | D1
struct | D1< BD_1ST >
struct | D1< BD_2ND >
struct | D1< BD_3RD >
struct | D1< BD_HJWENO5 >
struct | D1< BD_WENO5 >
struct | D1< CD_2ND >
struct | D1< CD_2NDT >
struct | D1< CD_4TH >
struct | D1< CD_6TH >
struct | D1< FD_1ST >
struct | D1< FD_2ND >
struct | D1< FD_3RD >
struct | D1< FD_HJWENO5 >
struct | D1< FD_WENO5 >
struct | D1Vec
struct | D1Vec< CD_2ND >
struct | D1Vec< CD_2NDT >
struct | D1Vec< CD_4TH >
struct | D1Vec< CD_6TH >
struct | D2
struct | D2< CD_FOURTH >
struct | D2< CD_SECOND >
struct | D2< CD_SIXTH >
class | DDA
| A Digital Differential Analyzer specialized for OpenVDB grids. More...
struct | Delta
| Delta for small floating-point offsets. More...
struct | Delta< double >
struct | Delta< float >
class | DenseStencil
| Dense stencil of a given width. More...
struct | Divergence
| Compute the divergence of a vector-valued grid using differencing of various orders, the result defined with respect to the range-space of the map. More...
struct | Divergence< ScaleMap, CD_2ND >
struct | Divergence< ScaleMap, DiffScheme >
struct | Divergence< ScaleTranslateMap, CD_2ND >
struct | Divergence< ScaleTranslateMap, DiffScheme >
struct | Divergence< TranslationMap, DiffScheme >
struct | Divergence< UniformScaleMap, CD_2ND >
struct | Divergence< UniformScaleMap, DiffScheme >
struct | Divergence< UniformScaleTranslateMap, CD_2ND >
struct | Divergence< UniformScaleTranslateMap, DiffScheme >
class | Extrema
| This class computes the minimum and maximum values of a population of floating-point values. More...
class | FourthOrderDenseStencil
class | GenericMap
| A wrapper that holds a MapBase::ConstPtr and exposes a reduced set of functionality needed by the mathematical operators. More...
struct | Gradient
| Center difference gradient operators, defined with respect to the range-space of the `map`. More...
struct | Gradient< ScaleMap, CD_2ND >
struct | Gradient< ScaleTranslateMap, CD_2ND >
struct | Gradient< TranslationMap, DiffScheme >
struct | Gradient< UniformScaleMap, CD_2ND >
struct | Gradient< UniformScaleTranslateMap, CD_2ND >
struct | GradientBiased
| Biased gradient operators, defined with respect to the range-space of the map. More...
struct | GradientNormSqrd
struct | GradientNormSqrd< UniformScaleMap, GradScheme >
| Partial template specialization of GradientNormSqrd. More...
struct | GradientNormSqrd< UniformScaleTranslateMap, GradScheme >
| Partial template specialization of GradientNormSqrd. More...
class | GradStencil
class | Histogram
| This class computes a histogram, with a fixed interval width, of a population of floating-point values. More...
struct | is_diagonal_jacobian
struct | is_double
struct | is_double< double >
struct | is_linear
| Map traits. More...
struct | is_linear< AffineMap >
struct | is_linear< CompoundMap< T1, T2 > >
struct | is_linear< ScaleMap >
struct | is_linear< ScaleTranslateMap >
struct | is_linear< TranslationMap >
struct | is_linear< UniformScaleMap >
struct | is_linear< UniformScaleTranslateMap >
struct | is_linear< UnitaryMap >
struct | is_scale
struct | is_scale< ScaleMap >
struct | is_scale_translate
struct | is_scale_translate< ScaleTranslateMap >
struct | is_uniform_diagonal_jacobian
struct | is_uniform_scale
struct | is_uniform_scale< UniformScaleMap >
struct | is_uniform_scale_translate
struct | is_uniform_scale_translate< TranslationMap >
struct | is_uniform_scale_translate< UniformScaleTranslateMap >
struct | is_vec3d
struct | is_vec3d< Vec3d >
struct | ISCurl
| Curl operator defined in index space using various first derivative schemes. More...
struct | ISDivergence
| Divergence operator defined in index space using various first derivative schemes. More...
struct | ISGradient
| Gradient operators defined in index space of various orders. More...
struct | ISGradientBiased
| Biased Gradient Operators, using upwinding defined by the `Vec3Bias` input. More...
struct | ISGradientNormSqrd
struct | ISLaplacian
| Laplacian defined in index space, using various center-difference stencils. More...
struct | ISLaplacian< CD_FOURTH >
struct | ISLaplacian< CD_SECOND >
struct | ISLaplacian< CD_SIXTH >
struct | ISMeanCurvature
| Compute the mean curvature in index space. More...
struct | ISOpMagnitude
| Adapter for vector-valued index-space operators to return the vector magnitude. More...
struct | Laplacian
| Compute the Laplacian at a given location in a grid using finite differencing of various orders. The result is defined in the range of the map. More...
struct | Laplacian< ScaleMap, DiffScheme >
struct | Laplacian< ScaleTranslateMap, DiffScheme >
struct | Laplacian< TranslationMap, DiffScheme >
struct | Laplacian< UniformScaleMap, DiffScheme >
struct | Laplacian< UniformScaleTranslateMap, DiffScheme >
struct | Laplacian< UnitaryMap, DiffScheme >
struct | LevelSetHDDA
| Helper class that implements Hierarchical Digital Differential Analyzers and is specialized for ray intersections with level sets. More...
struct | LevelSetHDDA< TreeT, -1 >
| Specialization of Hierarchical Digital Differential Analyzer class that intersects a ray against the voxels of a level set. More...
struct | MapAdapter
| Adapter to associate a map with a world-space operator, giving it the same call signature as an index-space operator. More...
class | MapBase
| Abstract base class for maps. More...
class | MapRegistry
| Threadsafe singleton object for accessing the map type-name dictionary. Associates a map type-name with a factory function. More...
class | Mat
class | Mat2
class | Mat3
| 3x3 matrix class. More...
class | Mat4
| 4x4 -matrix class. More...
struct | MeanCurvature
| Compute the mean curvature. More...
struct | MeanCurvature< TranslationMap, DiffScheme2, DiffScheme1 >
struct | MeanCurvature< UniformScaleMap, DiffScheme2, DiffScheme1 >
struct | MeanCurvature< UniformScaleTranslateMap, DiffScheme2, DiffScheme1 >
class | MinMax
| Templated class to compute the minimum and maximum values. More...
class | NineteenPointStencil
class | NonlinearFrustumMap
| This map is composed of three steps. First it will take a box of size (Lx X Ly X Lz) defined by a member data bounding box and map it into a frustum with near plane (1 X Ly/Lx) and prescribed depth Then this frustum is transformed by an internal second map: most often a uniform scale, but other effects can be achieved by accumulating translation, shear and rotation: these are all applied to the second map. More...
struct | OpMagnitude
| Adapter for vector-valued world-space operators to return the vector magnitude. More...
struct | promote
class | QuantizedUnitVec
| Unit vector occupying only 16 bits. More...
class | Quat
class | Rand01
| Simple generator of random numbers over the range [0, 1) More...
class | RandInt
| Simple random integer generator. More...
class | Ray
class | ScaleMap
| A specialized Affine transform that scales along the principal axis the scaling need not be uniform in the three-directions. More...
class | ScaleTranslateMap
| A specialized Affine transform that scales along the principal axis the scaling need not be uniform in the three-directions, and then translates the result. More...
class | SecondOrderDenseStencil
class | SevenPointStencil
class | SixthOrderDenseStencil
class | Stats
| This class computes statistics (minimum value, maximum value, mean, variance and standard deviation) of a population of floating-point values. More...
class | ThirteenPointStencil
struct | Tolerance
| Tolerance for floating-point comparison. More...
struct | Tolerance< double >
struct | Tolerance< float >
class | Transform
class | TranslationMap
| A specialized linear transform that performs a translation. More...
class | Tuple
class | UniformScaleMap
| A specialized Affine transform that scales along the principal axis the scaling is uniform in the three-directions. More...
class | UniformScaleTranslateMap
| A specialized Affine transform that uniformaly scales along the principal axis and then translates the result. More...
class | UnitaryMap
| A specialized linear transform that performs a unitary maping i.e. rotation and or reflection. More...
class | Vec2
class | Vec3
class | Vec4
class | VolumeHDDA
| Helper class that implements Hierarchical Digital Differential Analyzers for ray intersections against a generic volume. More...
class | VolumeHDDA< TreeT, RayT, 0 >
| Specialization of Hierarchical Digital Differential Analyzer class that intersects against the leafs or tiles of a generic volume. More...
class | WenoStencil
| This is a special 19-point stencil that supports optimal fifth-order WENO upwinding, second-order central differencing, Laplacian, and zero-crossing test. More...

## Typedefs
using | half = internal::half
using | UnitaryAndTranslationMap = CompoundMap<UnitaryMap, TranslationMap>
using | SpectralDecomposedMap = CompoundMap<CompoundMap<UnitaryMap, ScaleMap>, UnitaryMap>
using | SymmetricMap = SpectralDecomposedMap
using | FullyDecomposedMap = CompoundMap<SymmetricMap, UnitaryAndTranslationMap>
using | PolarDecomposedMap = CompoundMap<SymmetricMap, UnitaryMap>
using | Mat3s = Mat3<float>
using | Mat3d = Mat3<double>
using | Mat3f = Mat3d
using | Mat4s = Mat4<float>
using | Mat4d = Mat4<double>
using | Mat4f = Mat4d
using | Random01 = Rand01<double, std::mt19937>
using | RandomInt = RandInt<int, std::mt19937>
using | Quats = Quat<float>
using | Quatd = Quat<double>
using | Vec2i = Vec2<int32_t>
using | Vec2ui = Vec2<uint32_t>
using | Vec2s = Vec2<float>
using | Vec2d = Vec2<double>
using | Vec3i = Vec3<int32_t>
using | Vec3ui = Vec3<uint32_t>
using | Vec3s = Vec3<float>
using | Vec3d = Vec3<double>
using | Vec4i = Vec4<int32_t>
using | Vec4ui = Vec4<uint32_t>
using | Vec4s = Vec4<float>
using | Vec4d = Vec4<double>

## Enumerations
enum | DScheme { UNKNOWN_DS = -1 , CD_2NDT = 0 , CD_2ND , CD_4TH , CD_6TH , FD_1ST , FD_2ND , FD_3RD , BD_1ST , BD_2ND , BD_3RD , FD_WENO5 , BD_WENO5 , FD_HJWENO5 , BD_HJWENO5 }
| Different discrete schemes used in the first derivatives. More...
enum | { NUM_DS_SCHEMES = BD_HJWENO5 + 1 }
enum | DDScheme { UNKNOWN_DD = -1 , CD_SECOND = 0 , CD_FOURTH , CD_SIXTH }
| Different discrete schemes used in the second derivatives. More...
enum | { NUM_DD_SCHEMES = CD_SIXTH + 1 }
enum | BiasedGradientScheme { UNKNOWN_BIAS = -1 , FIRST_BIAS = 0 , SECOND_BIAS , THIRD_BIAS , WENO5_BIAS , HJWENO5_BIAS }
| Biased Gradients are limited to non-centered differences. More...
enum | { NUM_BIAS_SCHEMES = HJWENO5_BIAS + 1 }
enum | TemporalIntegrationScheme { UNKNOWN_TIS = -1 , TVD_RK1 , TVD_RK2 , TVD_RK3 }
| Temporal integration schemes. More...
enum | { NUM_TEMPORAL_SCHEMES = TVD_RK3 + 1 }
enum | Axis { X_AXIS = 0 , Y_AXIS = 1 , Z_AXIS = 2 }
enum | RotationOrder { XYZ_ROTATION = 0 , XZY_ROTATION , YXZ_ROTATION , YZX_ROTATION , ZXY_ROTATION , ZYX_ROTATION , XZX_ROTATION , ZXZ_ROTATION }

## Functions
template<>
auto | cwiseAdd (const math::Vec3< math::half > &v, const float s)
template<typename Vec3T>
std::ostream & | operator<< (std::ostream &os, const BBox< Vec3T > &b)
std::ostream & | operator<< (std::ostream &os, const Coord &xyz)
Coord | Abs (const Coord &xyz)
template<typename T>
Vec3< typename promote< T, typename Coord::ValueType >::type > | operator+ (const Vec3< T > &v0, const Coord &v1)
| Allow a Coord to be added to or subtracted from a Vec3.
template<typename T>
Vec3< typename promote< T, typename Coord::ValueType >::type > | operator+ (const Coord &v1, const Vec3< T > &v0)
template<typename T>
Vec3< typename promote< T, Coord::ValueType >::type > | operator- (const Vec3< T > &v0, const Coord &v1)
| Allow a Coord to be subtracted from a Vec3.
template<typename T>
Vec3< typename promote< T, Coord::ValueType >::type > | operator- (const Coord &v1, const Vec3< T > &v0)
std::ostream & | operator<< (std::ostream &os, const CoordBBox &b)
template<typename RayT, Index Log2Dim>
std::ostream & | operator<< (std::ostream &os, const DDA< RayT, Log2Dim > &dda)
| Output streaming of the Ray class.
std::string | dsSchemeToString (DScheme dss)
DScheme | stringToDScheme (const std::string &s)
std::string | dsSchemeToMenuName (DScheme dss)
std::string | biasedGradientSchemeToString (BiasedGradientScheme bgs)
BiasedGradientScheme | stringToBiasedGradientScheme (const std::string &s)
std::string | biasedGradientSchemeToMenuName (BiasedGradientScheme bgs)
std::string | temporalIntegrationSchemeToString (TemporalIntegrationScheme tis)
TemporalIntegrationScheme | stringToTemporalIntegrationScheme (const std::string &s)
std::string | temporalIntegrationSchemeToMenuName (TemporalIntegrationScheme tis)
template<typename ValueType>
ValueType | WENO5 (const ValueType &v1, const ValueType &v2, const ValueType &v3, const ValueType &v4, const ValueType &v5, float scale2=0.01f)
| Implementation of nominally fifth-order finite-difference WENO.
template<typename Real>
Real | GodunovsNormSqrd (bool isOutside, Real dP_xm, Real dP_xp, Real dP_ym, Real dP_yp, Real dP_zm, Real dP_zp)
template<typename Real>
Real | GodunovsNormSqrd (bool isOutside, const Vec3< Real > &gradient_m, const Vec3< Real > &gradient_p)
OPENVDB_API SharedPtr< SymmetricMap > | createSymmetricMap (const Mat3d &m)
| Utility methods.
OPENVDB_API SharedPtr< FullyDecomposedMap > | createFullyDecomposedMap (const Mat4d &m)
| General decomposition of a Matrix into a Unitary (e.g. rotation) following a Symmetric (e.g. stretch & shear)
OPENVDB_API SharedPtr< PolarDecomposedMap > | createPolarDecomposedMap (const Mat3d &m)
| Decomposes a general linear into translation following polar decomposition.
OPENVDB_API SharedPtr< MapBase > | simplify (SharedPtr< AffineMap > affine)
| reduces an AffineMap to a ScaleMap or a ScaleTranslateMap when it can
OPENVDB_API Mat4d | approxInverse (const Mat4d &mat)
| Returns the left pseudoInverse of the input matrix when the 3x3 part is symmetric otherwise it zeros the 3x3 and reverses the translation.
template<class MatType>
MatType | rotation (const Quat< typename MatType::value_type > &q, typename MatType::value_type eps=static_cast< typename MatType::value_type >(1.0e-8))
| Return the rotation matrix specified by the given quaternion.
template<class MatType>
MatType | rotation (Axis axis, typename MatType::value_type angle)
| Return a matrix for rotation by angle radians about the given axis.
template<class MatType>
MatType | rotation (const Vec3< typename MatType::value_type > &_axis, typename MatType::value_type angle)
| Return a matrix for rotation by angle radians about the given axis.
template<class MatType>
Vec3< typename MatType::value_type > | eulerAngles (const MatType &mat, RotationOrder rotationOrder, typename MatType::value_type eps=static_cast< typename MatType::value_type >(1.0e-8))
| Return the Euler angles composing the given rotation matrix.
template<typename MatType, typename ValueType1, typename ValueType2>
MatType | rotation (const Vec3< ValueType1 > &_v1, const Vec3< ValueType2 > &_v2, typename MatType::value_type eps=static_cast< typename MatType::value_type >(1.0e-8))
| Return a rotation matrix that maps v1 onto v2 about the cross product of v1 and v2.
template<class MatType>
MatType | scale (const Vec3< typename MatType::value_type > &s)
| Return a matrix that scales by s.
template<class MatType>
Vec3< typename MatType::value_type > | getScale (const MatType &mat)
| Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
template<class MatType>
MatType | unit (const MatType &mat, typename MatType::value_type eps=1.0e-8)
| Return a copy of the given matrix with its upper 3×3 rows normalized.
template<class MatType>
MatType | unit (const MatType &in, typename MatType::value_type eps, Vec3< typename MatType::value_type > &scaling)
| Return a copy of the given matrix with its upper 3×3 rows normalized, and return the length of each of these rows in scaling.
template<class MatType>
MatType | shear (Axis axis0, Axis axis1, typename MatType::value_type shear)
| Set the matrix to a shear along axis0 by a fraction of axis1.
template<class MatType>
MatType | skew (const Vec3< typename MatType::value_type > &skew)
| Return a matrix as the cross product of the given vector.
template<class MatType>
MatType | aim (const Vec3< typename MatType::value_type > &direction, const Vec3< typename MatType::value_type > &vertical)
| Return an orientation matrix such that z points along direction, and y is along the direction / vertical plane.
template<class MatType>
MatType | snapMatBasis (const MatType &source, Axis axis, const Vec3< typename MatType::value_type > &direction)
| This function snaps a specific axis to a specific direction, preserving scaling.
template<class MatType>
MatType & | padMat4 (MatType &dest)
| Write 0s along Mat4's last row and column, and a 1 on its diagonal.
template<typename MatType>
void | sqrtSolve (const MatType &aA, MatType &aB, double aTol=0.01)
| Solve for A=B*B, given A.
template<typename MatType>
void | powSolve (const MatType &aA, MatType &aB, double aPower, double aTol=0.01)
template<typename MatType>
bool | isIdentity (const MatType &m)
| Determine if a matrix is an identity matrix.
template<typename MatType>
bool | isInvertible (const MatType &m)
| Determine if a matrix is invertible.
template<typename MatType>
bool | isSymmetric (const MatType &m)
| Determine if a matrix is symmetric.
template<typename MatType>
bool | isUnitary (const MatType &m)
| Determine if a matrix is unitary (i.e., rotation or reflection).
template<typename MatType>
bool | isDiagonal (const MatType &mat)
| Determine if a matrix is diagonal.
template<typename MatType>
MatType::ValueType | lInfinityNorm (const MatType &matrix)
| Return the L∞ norm of an N×N matrix.
template<typename MatType>
MatType::ValueType | lOneNorm (const MatType &matrix)
| Return the L1 norm of an N×N matrix.
template<typename MatType>
bool | polarDecomposition (const MatType &input, MatType &unitary, MatType &positive_hermitian, unsigned int MAX_ITERATIONS=100)
| Decompose an invertible 3×3 matrix into a unitary matrix followed by a symmetric matrix (positive semi-definite Hermitian), i.e., M = U * S.
template<unsigned SIZE, typename T>
bool | cwiseLessThan (const Mat< SIZE, T > &m0, const Mat< SIZE, T > &m1)
template<unsigned SIZE, typename T>
bool | cwiseGreaterThan (const Mat< SIZE, T > &m0, const Mat< SIZE, T > &m1)
template<typename T0, typename T1>
Mat3< typename promote< T0, T1 >::type > | operator* (const Mat3< T0 > &m0, const Mat3< T1 > &m1)
| Multiply m0 by m1 and return the resulting matrix.
template<typename T>
Mat3< T > | outerProduct (const Vec3< T > &v1, const Vec3< T > &v2)
template<typename T, typename T0>
Mat3< T > | powLerp (const Mat3< T0 > &m1, const Mat3< T0 > &m2, T t)
template<typename T>
bool | diagonalizeSymmetricMatrix (const Mat3< T > &input, Mat3< T > &Q, Vec3< T > &D, unsigned int MAX_ITERATIONS=250)
| Use Jacobi iterations to decompose a symmetric 3x3 matrix (diagonalize and compute eigenvectors)
template<typename T>
Mat3< T > | Abs (const Mat3< T > &m)
template<typename Type1, typename Type2>
Mat3< Type1 > | cwiseAdd (const Mat3< Type1 > &m, const Type2 s)
template<typename T>
bool | cwiseLessThan (const Mat3< T > &m0, const Mat3< T > &m1)
template<typename T>
bool | cwiseGreaterThan (const Mat3< T > &m0, const Mat3< T > &m1)
template<typename T0, typename T1>
Vec3< T1 > | transformNormal (const Mat4< T0 > &m, const Vec3< T1 > &n)
template<typename T>
bool | isAffine (const Mat4< T > &m)
template<typename T>
bool | hasTranslation (const Mat4< T > &m)
template<typename T>
Mat4< T > | Abs (const Mat4< T > &m)
template<typename Type1, typename Type2>
Mat4< Type1 > | cwiseAdd (const Mat4< Type1 > &m, const Type2 s)
template<typename T>
bool | cwiseLessThan (const Mat4< T > &m0, const Mat4< T > &m1)
template<typename T>
bool | cwiseGreaterThan (const Mat4< T > &m0, const Mat4< T > &m1)
std::string | operator+ (const std::string &s, bool)
| Needed to support the (zeroVal<ValueType>() + val) idiom when `ValueType` is `std::string`.
std::string | operator+ (const std::string &s, int)
std::string | operator+ (const std::string &s, float)
std::string | operator+ (const std::string &s, double)
template<typename Type1, typename Type2>
auto | cwiseAdd (const Type1 &v, const Type2 s)
| Componentwise adder for POD types.
template<typename Type1, typename Type2>
bool | cwiseLessThan (const Type1 &a, const Type2 &b)
| Componentwise less than for POD types.
template<typename Type1, typename Type2>
bool | cwiseGreaterThan (const Type1 &a, const Type2 &b)
| Componentwise greater than for POD types.
template<typename T>
constexpr T | pi ()
| Pi constant taken from Boost to match old behaviour.
template<>
constexpr float | pi ()
template<>
constexpr double | pi ()
template<>
constexpr long double | pi ()
template<typename T>
T | negative (const T &val)
| Return the unary negation of the given value.
template<>
bool | negative (const bool &val)
| Return the negation of the given boolean.
template<>
std::string | negative (const std::string &val)
| Return the "negation" of the given string.
template<typename Type>
Type | Clamp (Type x, Type min, Type max)
| Return x clamped to [min, max].
template<typename Type>
Type | Clamp01 (Type x)
| Return x clamped to [0, 1].
template<typename Type>
bool | ClampTest01 (Type &x)
| Return `true` if x is outside [0,1].
template<typename Type>
Type | SmoothUnitStep (Type x)
| Return 0 if x < 0, 1 if x > 1 or else (3 − 2 x) x².
template<typename Type>
Type | SmoothUnitStep (Type x, Type min, Type max)
| Return 0 if x < min, 1 if x > max or else (3 − 2 t) t², where t = (x − min)/(max − min).
int32_t | Abs (int32_t i)
| Return the absolute value of the given quantity.
int64_t | Abs (int64_t i)
float | Abs (float x)
double | Abs (double x)
long double | Abs (long double x)
uint32_t | Abs (uint32_t i)
uint64_t | Abs (uint64_t i)
bool | Abs (bool b)
template<typename T>
std::enable_if< std::is_same< T, size_t >::value, T >::type | Abs (T i)
template<typename Type>
bool | isZero (const Type &x)
| Return `true` if x is exactly equal to zero.
template<typename Type>
bool | isApproxZero (const Type &x)
| Return `true` if x is equal to zero to within the default floating-point comparison tolerance.
template<typename Type>
bool | isApproxZero (const Type &x, const Type &tolerance)
| Return `true` if x is equal to zero to within the given tolerance.
template<typename Type>
bool | isNegative (const Type &x)
| Return `true` if x is less than zero.
template<>
bool | isNegative< bool > (const bool &)
bool | isFinite (const float x)
| Return `true` if x is finite.
template<typename Type, typename std::enable_if< std::is_arithmetic< Type >::value, int >::type = 0>
bool | isFinite (const Type &x)
| Return `true` if x is finite.
bool | isInfinite (const float x)
| Return `true` if x is an infinity value (either positive infinity or negative infinity).
template<typename Type, typename std::enable_if< std::is_arithmetic< Type >::value, int >::type = 0>
bool | isInfinite (const Type &x)
| Return `true` if x is an infinity value (either positive infinity or negative infinity).
bool | isNan (const float x)
| Return `true` if x is a NaN (Not-A-Number) value.
template<typename Type, typename std::enable_if< std::is_arithmetic< Type >::value, int >::type = 0>
bool | isNan (const Type &x)
| Return `true` if x is a NaN (Not-A-Number) value.
template<typename Type>
bool | isApproxEqual (const Type &a, const Type &b, const Type &tolerance)
| Return `true` if a is equal to b to within the given tolerance.
template<typename Type>
bool | isApproxEqual (const Type &a, const Type &b)
| Return `true` if a is equal to b to within the default floating-point comparison tolerance.
template<>
bool | isApproxEqual< bool > (const bool &a, const bool &b)
template<>
bool | isApproxEqual< bool > (const bool &a, const bool &b, const bool &)
template<>
bool | isApproxEqual< std::string > (const std::string &a, const std::string &b)
template<>
bool | isApproxEqual< std::string > (const std::string &a, const std::string &b, const std::string &)
template<typename Type>
bool | isApproxLarger (const Type &a, const Type &b, const Type &tolerance)
| Return `true` if a is larger than b to within the given tolerance, i.e., if b - a < tolerance.
template<typename T0, typename T1>
bool | isExactlyEqual (const T0 &a, const T1 &b)
| Return `true` if a is exactly equal to b.
template<typename Type>
bool | isRelOrApproxEqual (const Type &a, const Type &b, const Type &absTol, const Type &relTol)
template<>
bool | isRelOrApproxEqual (const bool &a, const bool &b, const bool &, const bool &)
int32_t | floatToInt32 (const float f)
int64_t | doubleToInt64 (const double d)
bool | isUlpsEqual (const double aLeft, const double aRight, const int64_t aUnitsInLastPlace)
bool | isUlpsEqual (const float aLeft, const float aRight, const int32_t aUnitsInLastPlace)
template<typename Type>
Type | Pow2 (Type x)
| Return x2.
template<typename Type>
Type | Pow3 (Type x)
| Return x3.
template<typename Type>
Type | Pow4 (Type x)
| Return x4.
template<typename Type>
Type | Pow (Type x, int n)
| Return xn.
float | Pow (float b, float e)
| Return be.
double | Pow (double b, double e)
template<typename Type>
const Type & | Max (const Type &a, const Type &b)
| Return the maximum of two values.
template<typename Type>
const Type & | Max (const Type &a, const Type &b, const Type &c)
| Return the maximum of three values.
template<typename Type>
const Type & | Max (const Type &a, const Type &b, const Type &c, const Type &d)
| Return the maximum of four values.
template<typename Type>
const Type & | Max (const Type &a, const Type &b, const Type &c, const Type &d, const Type &e)
| Return the maximum of five values.
template<typename Type>
const Type & | Max (const Type &a, const Type &b, const Type &c, const Type &d, const Type &e, const Type &f)
| Return the maximum of six values.
template<typename Type>
const Type & | Max (const Type &a, const Type &b, const Type &c, const Type &d, const Type &e, const Type &f, const Type &g)
| Return the maximum of seven values.
template<typename Type>
const Type & | Max (const Type &a, const Type &b, const Type &c, const Type &d, const Type &e, const Type &f, const Type &g, const Type &h)
| Return the maximum of eight values.
template<typename Type>
const Type & | Min (const Type &a, const Type &b)
| Return the minimum of two values.
template<typename Type>
const Type & | Min (const Type &a, const Type &b, const Type &c)
| Return the minimum of three values.
template<typename Type>
const Type & | Min (const Type &a, const Type &b, const Type &c, const Type &d)
| Return the minimum of four values.
template<typename Type>
const Type & | Min (const Type &a, const Type &b, const Type &c, const Type &d, const Type &e)
| Return the minimum of five values.
template<typename Type>
const Type & | Min (const Type &a, const Type &b, const Type &c, const Type &d, const Type &e, const Type &f)
| Return the minimum of six values.
template<typename Type>
const Type & | Min (const Type &a, const Type &b, const Type &c, const Type &d, const Type &e, const Type &f, const Type &g)
| Return the minimum of seven values.
template<typename Type>
const Type & | Min (const Type &a, const Type &b, const Type &c, const Type &d, const Type &e, const Type &f, const Type &g, const Type &h)
| Return the minimum of eight values.
template<typename Type>
Type | Exp (const Type &x)
| Return ex.
float | Sin (const float &x)
| Return sin x.
double | Sin (const double &x)
float | Cos (const float &x)
| Return cos x.
double | Cos (const double &x)
template<typename Type>
int | Sign (const Type &x)
| Return the sign of the given value as an integer (either -1, 0 or 1).
template<typename Type>
bool | SignChange (const Type &a, const Type &b)
| Return `true` if a and b have different signs.
template<typename Type>
bool | ZeroCrossing (const Type &a, const Type &b)
| Return `true` if the interval [a, b] includes zero, i.e., if either a or b is zero or if they have different signs.
float | Sqrt (float x)
| Return the square root of a floating-point value.
double | Sqrt (double x)
long double | Sqrt (long double x)
float | Cbrt (float x)
| Return the cube root of a floating-point value.
double | Cbrt (double x)
long double | Cbrt (long double x)
int | Mod (int x, int y)
| Return the remainder of x / y.
float | Mod (float x, float y)
double | Mod (double x, double y)
long double | Mod (long double x, long double y)
template<typename Type>
Type | Remainder (Type x, Type y)
float | RoundUp (float x)
| Return x rounded up to the nearest integer.
double | RoundUp (double x)
long double | RoundUp (long double x)
template<typename Type>
Type | RoundUp (Type x, Type base)
| Return x rounded up to the nearest multiple of base.
float | RoundDown (float x)
| Return x rounded down to the nearest integer.
double | RoundDown (double x)
long double | RoundDown (long double x)
template<typename Type>
Type | RoundDown (Type x, Type base)
| Return x rounded down to the nearest multiple of base.
float | Round (float x)
| Return x rounded to the nearest integer.
double | Round (double x)
long double | Round (long double x)
template<typename Type>
Type | EuclideanRemainder (Type x)
template<typename Type>
Type | IntegerPart (Type x)
| Return the integer part of x.
template<typename Type>
Type | FractionalPart (Type x)
| Return the fractional part of x.
int | Floor (float x)
| Return the floor of x.
int | Floor (double x)
int | Floor (long double x)
int | Ceil (float x)
| Return the ceiling of x.
int | Ceil (double x)
int | Ceil (long double x)
template<typename Type>
Type | Chop (Type x, Type delta)
| Return x if it is greater or equal in magnitude than delta. Otherwise, return zero.
template<typename Type>
Type | Truncate (Type x, unsigned int digits)
| Return x truncated to the given number of decimal digits.
template<typename T>
auto | PrintCast (const T &val) -> typename std::enable_if<!std::is_same< T, int8_t >::value &&!std::is_same< T, uint8_t >::value, const T & >::type
| 8-bit integer values print to std::ostreams as characters. Cast them so that they print as integers instead.
int32_t | PrintCast (int8_t val)
uint32_t | PrintCast (uint8_t val)
template<typename Type>
Type | Inv (Type x)
| Return the inverse of x.
template<typename Vec3T>
size_t | MinIndex (const Vec3T &v)
| Return the index [0,1,2] of the smallest value in a 3D vector.
template<typename Vec3T>
size_t | MaxIndex (const Vec3T &v)
| Return the index [0,1,2] of the largest value in a 3D vector.
OPENVDB_API Vec3d | closestPointOnTriangleToPoint (const Vec3d &a, const Vec3d &b, const Vec3d &c, const Vec3d &p, Vec3d &uvw)
| Closest Point on Triangle to Point. Given a triangle `abc` and a point `p`, return the point on `abc` closest to `p` and the corresponding barycentric coordinates.
OPENVDB_API Vec3d | closestPointOnSegmentToPoint (const Vec3d &a, const Vec3d &b, const Vec3d &p, double &t)
| Closest Point on Line Segment to Point. Given segment `ab` and point `p`, return the point on `ab` closest to `p` and `t` the parametric distance to `b`.
template<typename T>
Quat< T > | slerp (const Quat< T > &q1, const Quat< T > &q2, T t, T tolerance=0.00001)
| Linear interpolation between the two quaternions.
template<typename S, typename T>
Quat< T > | operator* (S scalar, const Quat< T > &q)
| Multiply each element of the given quaternion by scalar and return the result.
template<typename T, typename T0>
Mat3< T > | slerp (const Mat3< T0 > &m1, const Mat3< T0 > &m2, T t)
| Interpolate between m1 and m2. Converts to quaternion form and uses slerp m1 and m2 must be rotation matrices!
template<typename T, typename T0>
Mat3< T > | bezLerp (const Mat3< T0 > &m1, const Mat3< T0 > &m2, const Mat3< T0 > &m3, const Mat3< T0 > &m4, T t)
template<typename RealT>
std::ostream & | operator<< (std::ostream &os, const Ray< RealT > &r)
| Output streaming of the Ray class.
OPENVDB_API void | calculateBounds (const Transform &t, const Vec3d &minWS, const Vec3d &maxWS, Vec3d &minIS, Vec3d &maxIS)
| Calculate an axis-aligned bounding box in index space from an axis-aligned bounding box in world space.
OPENVDB_API std::ostream & | operator<< (std::ostream &, const Transform &)
template<typename ResolvedMapType, typename OpType>
void | doProcessTypedMap (Transform &transform, OpType &op)
| Helper function used internally by processTypedMap()
template<typename ResolvedMapType, typename OpType>
void | doProcessTypedMap (const Transform &transform, OpType &op)
| Helper function used internally by processTypedMap()
template<typename TransformType, typename OpType>
bool | processTypedMap (TransformType &transform, OpType &op)
| Utility function that, given a generic map pointer, calls a functor on the fully-resoved map.
template<int SIZE, typename T0, typename T1>
bool | operator< (const Tuple< SIZE, T0 > &t0, const Tuple< SIZE, T1 > &t1)
template<int SIZE, typename T0, typename T1>
bool | operator> (const Tuple< SIZE, T0 > &t0, const Tuple< SIZE, T1 > &t1)
template<int SIZE, typename T>
Tuple< SIZE, T > | Abs (const Tuple< SIZE, T > &t)
template<int SIZE, typename T>
bool | isNan (const Tuple< SIZE, T > &t)
| Return `true` if a Nan is present in the tuple.
template<int SIZE, typename T>
bool | isInfinite (const Tuple< SIZE, T > &t)
| Return `true` if an Inf is present in the tuple.
template<int SIZE, typename T>
bool | isFinite (const Tuple< SIZE, T > &t)
| Return `true` if no Nan or Inf values are present.
template<int SIZE, typename T>
bool | isZero (const Tuple< SIZE, T > &t)
| Return `true` if all elements are exactly equal to zero.
template<int SIZE, typename T>
std::ostream & | operator<< (std::ostream &ostr, const Tuple< SIZE, T > &classname)
| Write a Tuple to an output stream.
template<typename S, typename T>
Vec2< typename promote< S, T >::type > | operator* (S scalar, const Vec2< T > &v)
| Multiply each element of the given vector by scalar and return the result.
template<typename S, typename T>
Vec2< typename promote< S, T >::type > | operator* (const Vec2< T > &v, S scalar)
| Multiply each element of the given vector by scalar and return the result.
template<typename T0, typename T1>
Vec2< typename promote< T0, T1 >::type > | operator* (const Vec2< T0 > &v0, const Vec2< T1 > &v1)
| Multiply corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec2< typename promote< S, T >::type > | operator/ (S scalar, const Vec2< T > &v)
| Divide scalar by each element of the given vector and return the result.
template<typename S, typename T>
Vec2< typename promote< S, T >::type > | operator/ (const Vec2< T > &v, S scalar)
| Divide each element of the given vector by scalar and return the result.
template<typename T0, typename T1>
Vec2< typename promote< T0, T1 >::type > | operator/ (const Vec2< T0 > &v0, const Vec2< T1 > &v1)
| Divide corresponding elements of v0 and v1 and return the result.
template<typename T0, typename T1>
Vec2< typename promote< T0, T1 >::type > | operator+ (const Vec2< T0 > &v0, const Vec2< T1 > &v1)
| Add corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec2< typename promote< S, T >::type > | operator+ (const Vec2< T > &v, S scalar)
| Add scalar to each element of the given vector and return the result.
template<typename T0, typename T1>
Vec2< typename promote< T0, T1 >::type > | operator- (const Vec2< T0 > &v0, const Vec2< T1 > &v1)
| Subtract corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec2< typename promote< S, T >::type > | operator- (const Vec2< T > &v, S scalar)
| Subtract scalar from each element of the given vector and return the result.
template<typename T>
T | angle (const Vec2< T > &v1, const Vec2< T > &v2)
template<typename T>
bool | isApproxEqual (const Vec2< T > &a, const Vec2< T > &b)
template<typename T>
bool | isApproxEqual (const Vec2< T > &a, const Vec2< T > &b, const Vec2< T > &eps)
template<typename T>
Vec2< T > | Abs (const Vec2< T > &v)
template<typename T>
void | orthonormalize (Vec2< T > &v1, Vec2< T > &v2)
template<typename T>
Vec2< T > | minComponent (const Vec2< T > &v1, const Vec2< T > &v2)
| Return component-wise minimum of the two vectors.
template<typename T>
Vec2< T > | maxComponent (const Vec2< T > &v1, const Vec2< T > &v2)
| Return component-wise maximum of the two vectors.
template<typename T>
Vec2< T > | Exp (Vec2< T > v)
| Return a vector with the exponent applied to each of the components of the input vector.
template<typename T>
Vec2< T > | Log (Vec2< T > v)
| Return a vector with log applied to each of the components of the input vector.
template<typename T0, typename T1>
bool | operator== (const Vec3< T0 > &v0, const Vec3< T1 > &v1)
| Equality operator, does exact floating point comparisons.
template<typename T0, typename T1>
bool | operator!= (const Vec3< T0 > &v0, const Vec3< T1 > &v1)
| Inequality operator, does exact floating point comparisons.
template<typename S, typename T>
Vec3< typename promote< S, T >::type > | operator* (S scalar, const Vec3< T > &v)
| Multiply each element of the given vector by scalar and return the result.
template<typename S, typename T>
Vec3< typename promote< S, T >::type > | operator* (const Vec3< T > &v, S scalar)
| Multiply each element of the given vector by scalar and return the result.
template<typename T0, typename T1>
Vec3< typename promote< T0, T1 >::type > | operator* (const Vec3< T0 > &v0, const Vec3< T1 > &v1)
| Multiply corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec3< typename promote< S, T >::type > | operator/ (S scalar, const Vec3< T > &v)
| Divide scalar by each element of the given vector and return the result.
template<typename S, typename T>
Vec3< typename promote< S, T >::type > | operator/ (const Vec3< T > &v, S scalar)
| Divide each element of the given vector by scalar and return the result.
template<typename T0, typename T1>
Vec3< typename promote< T0, T1 >::type > | operator/ (const Vec3< T0 > &v0, const Vec3< T1 > &v1)
| Divide corresponding elements of v0 and v1 and return the result.
template<typename T0, typename T1>
Vec3< typename promote< T0, T1 >::type > | operator+ (const Vec3< T0 > &v0, const Vec3< T1 > &v1)
| Add corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec3< typename promote< S, T >::type > | operator+ (const Vec3< T > &v, S scalar)
| Add scalar to each element of the given vector and return the result.
template<typename T0, typename T1>
Vec3< typename promote< T0, T1 >::type > | operator- (const Vec3< T0 > &v0, const Vec3< T1 > &v1)
| Subtract corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec3< typename promote< S, T >::type > | operator- (const Vec3< T > &v, S scalar)
| Subtract scalar from each element of the given vector and return the result.
template<typename T>
T | angle (const Vec3< T > &v1, const Vec3< T > &v2)
template<typename T>
bool | isApproxEqual (const Vec3< T > &a, const Vec3< T > &b)
template<typename T>
bool | isApproxEqual (const Vec3< T > &a, const Vec3< T > &b, const Vec3< T > &eps)
template<typename T>
Vec3< T > | Abs (const Vec3< T > &v)
template<typename T>
void | orthonormalize (Vec3< T > &v1, Vec3< T > &v2, Vec3< T > &v3)
template<typename T>
Vec3< T > | minComponent (const Vec3< T > &v1, const Vec3< T > &v2)
| Return component-wise minimum of the two vectors.
template<typename T>
Vec3< T > | maxComponent (const Vec3< T > &v1, const Vec3< T > &v2)
| Return component-wise maximum of the two vectors.
template<typename T>
Vec3< T > | Exp (Vec3< T > v)
| Return a vector with the exponent applied to each of the components of the input vector.
template<typename T>
Vec3< T > | Log (Vec3< T > v)
| Return a vector with log applied to each of the components of the input vector.
template<typename T0, typename T1>
bool | operator== (const Vec4< T0 > &v0, const Vec4< T1 > &v1)
| Equality operator, does exact floating point comparisons.
template<typename T0, typename T1>
bool | operator!= (const Vec4< T0 > &v0, const Vec4< T1 > &v1)
| Inequality operator, does exact floating point comparisons.
template<typename S, typename T>
Vec4< typename promote< S, T >::type > | operator* (S scalar, const Vec4< T > &v)
| Multiply each element of the given vector by scalar and return the result.
template<typename S, typename T>
Vec4< typename promote< S, T >::type > | operator* (const Vec4< T > &v, S scalar)
| Multiply each element of the given vector by scalar and return the result.
template<typename T0, typename T1>
Vec4< typename promote< T0, T1 >::type > | operator* (const Vec4< T0 > &v0, const Vec4< T1 > &v1)
| Multiply corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec4< typename promote< S, T >::type > | operator/ (S scalar, const Vec4< T > &v)
| Divide scalar by each element of the given vector and return the result.
template<typename S, typename T>
Vec4< typename promote< S, T >::type > | operator/ (const Vec4< T > &v, S scalar)
| Divide each element of the given vector by scalar and return the result.
template<typename T0, typename T1>
Vec4< typename promote< T0, T1 >::type > | operator/ (const Vec4< T0 > &v0, const Vec4< T1 > &v1)
| Divide corresponding elements of v0 and v1 and return the result.
template<typename T0, typename T1>
Vec4< typename promote< T0, T1 >::type > | operator+ (const Vec4< T0 > &v0, const Vec4< T1 > &v1)
| Add corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec4< typename promote< S, T >::type > | operator+ (const Vec4< T > &v, S scalar)
| Add scalar to each element of the given vector and return the result.
template<typename T0, typename T1>
Vec4< typename promote< T0, T1 >::type > | operator- (const Vec4< T0 > &v0, const Vec4< T1 > &v1)
| Subtract corresponding elements of v0 and v1 and return the result.
template<typename S, typename T>
Vec4< typename promote< S, T >::type > | operator- (const Vec4< T > &v, S scalar)
| Subtract scalar from each element of the given vector and return the result.
template<typename T>
bool | isApproxEqual (const Vec4< T > &a, const Vec4< T > &b)
template<typename T>
bool | isApproxEqual (const Vec4< T > &a, const Vec4< T > &b, const Vec4< T > &eps)
template<typename T>
Vec4< T > | Abs (const Vec4< T > &v)
template<typename T>
Vec4< T > | minComponent (const Vec4< T > &v1, const Vec4< T > &v2)
| Return component-wise minimum of the two vectors.
template<typename T>
Vec4< T > | maxComponent (const Vec4< T > &v1, const Vec4< T > &v2)
| Return component-wise maximum of the two vectors.
template<typename T>
Vec4< T > | Exp (Vec4< T > v)
| Return a vector with the exponent applied to each of the components of the input vector.
template<typename T>
Vec4< T > | Log (Vec4< T > v)
| Return a vector with log applied to each of the components of the input vector.
template<typename T0, typename T1>
bool | operator== (const Mat3< T0 > &m0, const Mat3< T1 > &m1)
| Equality operator, does exact floating point comparisons.
template<typename T0, typename T1>
bool | operator!= (const Mat3< T0 > &m0, const Mat3< T1 > &m1)
| Inequality operator, does exact floating point comparisons.
template<typename S, typename T>
Mat3< typename promote< S, T >::type > | operator* (S scalar, const Mat3< T > &m)
| Multiply each element of the given matrix by scalar and return the result.
template<typename S, typename T>
Mat3< typename promote< S, T >::type > | operator* (const Mat3< T > &m, S scalar)
| Multiply each element of the given matrix by scalar and return the result.
template<typename T0, typename T1>
Mat3< typename promote< T0, T1 >::type > | operator+ (const Mat3< T0 > &m0, const Mat3< T1 > &m1)
| Add corresponding elements of m0 and m1 and return the result.
template<typename T0, typename T1>
Mat3< typename promote< T0, T1 >::type > | operator- (const Mat3< T0 > &m0, const Mat3< T1 > &m1)
| Subtract corresponding elements of m0 and m1 and return the result.
template<typename T, typename MT>
Vec3< typename promote< T, MT >::type > | operator* (const Mat3< MT > &_m, const Vec3< T > &_v)
| Multiply _m by _v and return the resulting vector.
template<typename T, typename MT>
Vec3< typename promote< T, MT >::type > | operator* (const Vec3< T > &_v, const Mat3< MT > &_m)
| Multiply _v by _m and return the resulting vector.
template<typename T, typename MT>
Vec3< T > & | operator*= (Vec3< T > &_v, const Mat3< MT > &_m)
| Multiply _v by _m and replace _v with the resulting vector.
template<typename T0, typename T1>
bool | operator== (const Mat4< T0 > &m0, const Mat4< T1 > &m1)
| Equality operator, does exact floating point comparisons.
template<typename T0, typename T1>
bool | operator!= (const Mat4< T0 > &m0, const Mat4< T1 > &m1)
| Inequality operator, does exact floating point comparisons.
template<typename S, typename T>
Mat4< typename promote< S, T >::type > | operator* (S scalar, const Mat4< T > &m)
| Multiply each element of the given matrix by scalar and return the result.
template<typename S, typename T>
Mat4< typename promote< S, T >::type > | operator* (const Mat4< T > &m, S scalar)
| Multiply each element of the given matrix by scalar and return the result.
template<typename T, typename MT>
Vec4< typename promote< T, MT >::type > | operator* (const Mat4< MT > &_m, const Vec4< T > &_v)
| Multiply _m by _v and return the resulting vector.
template<typename T, typename MT>
Vec4< typename promote< T, MT >::type > | operator* (const Vec4< T > &_v, const Mat4< MT > &_m)
| Multiply _v by _m and return the resulting vector.
template<typename T, typename MT>
Vec3< typename promote< T, MT >::type > | operator* (const Mat4< MT > &_m, const Vec3< T > &_v)
| Multiply _m by _v and return the resulting vector.
template<typename T, typename MT>
Vec3< typename promote< T, MT >::type > | operator* (const Vec3< T > &_v, const Mat4< MT > &_m)
| Multiply _v by _m and return the resulting vector.
template<typename T0, typename T1>
Mat4< typename promote< T0, T1 >::type > | operator+ (const Mat4< T0 > &m0, const Mat4< T1 > &m1)
| Add corresponding elements of m0 and m1 and return the result.
template<typename T0, typename T1>
Mat4< typename promote< T0, T1 >::type > | operator- (const Mat4< T0 > &m0, const Mat4< T1 > &m1)
| Subtract corresponding elements of m0 and m1 and return the result.
template<typename T0, typename T1>
Mat4< typename promote< T0, T1 >::type > | operator* (const Mat4< T0 > &m0, const Mat4< T1 > &m1)
| Multiply m0 by m1 and return the resulting matrix.

## Typedef Documentation

## ◆ FullyDecomposedMap

using FullyDecomposedMap = CompoundMap<SymmetricMap, UnitaryAndTranslationMap>

## ◆ half

using half = internal::half

## ◆ Mat3d

using Mat3d = Mat3<double>

## ◆ Mat3f

using Mat3f = Mat3d

## ◆ Mat3s

using Mat3s = Mat3<float>

## ◆ Mat4d

using Mat4d = Mat4<double>

## ◆ Mat4f

using Mat4f = Mat4d

## ◆ Mat4s

using Mat4s = Mat4<float>

## ◆ PolarDecomposedMap

using PolarDecomposedMap = CompoundMap<SymmetricMap, UnitaryMap>

## ◆ Quatd

using Quatd = Quat<double>

## ◆ Quats

using Quats = Quat<float>

## ◆ Random01

using Random01 = Rand01<double, std::mt19937>

## ◆ RandomInt

using RandomInt = RandInt<int, std::mt19937>

## ◆ SpectralDecomposedMap

using SpectralDecomposedMap = CompoundMap<CompoundMap<UnitaryMap, ScaleMap>, UnitaryMap>

## ◆ SymmetricMap

using SymmetricMap = SpectralDecomposedMap

## ◆ UnitaryAndTranslationMap

using UnitaryAndTranslationMap = CompoundMap<UnitaryMap, TranslationMap>

## ◆ Vec2d

using Vec2d = Vec2<double>

## ◆ Vec2i

using Vec2i = Vec2<int32_t>

## ◆ Vec2s

using Vec2s = Vec2<float>

## ◆ Vec2ui

using Vec2ui = Vec2<uint32_t>

## ◆ Vec3d

using Vec3d = Vec3<double>

## ◆ Vec3i

using Vec3i = Vec3<int32_t>

## ◆ Vec3s

using Vec3s = Vec3<float>

## ◆ Vec3ui

using Vec3ui = Vec3<uint32_t>

## ◆ Vec4d

using Vec4d = Vec4<double>

## ◆ Vec4i

using Vec4i = Vec4<int32_t>

## ◆ Vec4s

using Vec4s = Vec4<float>

## ◆ Vec4ui

using Vec4ui = Vec4<uint32_t>

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
NUM_BIAS_SCHEMES |

## ◆ anonymous enum

anonymous enum

Enumerator
NUM_TEMPORAL_SCHEMES |

## ◆ anonymous enum

anonymous enum

Enumerator
NUM_DD_SCHEMES |

## ◆ anonymous enum

anonymous enum

Enumerator
NUM_DS_SCHEMES |

## ◆ Axis

enum Axis

Enumerator
X_AXIS |
Y_AXIS |
Z_AXIS |

## ◆ BiasedGradientScheme

enum BiasedGradientScheme

Biased Gradients are limited to non-centered differences.

Enumerator
UNKNOWN_BIAS |
FIRST_BIAS |
SECOND_BIAS |
THIRD_BIAS |
WENO5_BIAS |
HJWENO5_BIAS |

## ◆ DDScheme

enum DDScheme

Different discrete schemes used in the second derivatives.

Enumerator
UNKNOWN_DD |
CD_SECOND |
CD_FOURTH |
CD_SIXTH |

## ◆ DScheme

enum DScheme

Different discrete schemes used in the first derivatives.

Enumerator
UNKNOWN_DS |
CD_2NDT |
CD_2ND |
CD_4TH |
CD_6TH |
FD_1ST |
FD_2ND |
FD_3RD |
BD_1ST |
BD_2ND |
BD_3RD |
FD_WENO5 |
BD_WENO5 |
FD_HJWENO5 |
BD_HJWENO5 |

## ◆ RotationOrder

enum RotationOrder

Enumerator
XYZ_ROTATION |
XZY_ROTATION |
YXZ_ROTATION |
YZX_ROTATION |
ZXY_ROTATION |
ZYX_ROTATION |
XZX_ROTATION |
ZXZ_ROTATION |

## ◆ TemporalIntegrationScheme

enum TemporalIntegrationScheme

Temporal integration schemes.

Enumerator
UNKNOWN_TIS |
TVD_RK1 |
TVD_RK2 |
TVD_RK3 |

## Function Documentation

## ◆ Abs() [1/16]

bool Abs | ( | bool | b | ) |
| inline

## ◆ Abs() [2/16]

Coord Abs | ( | const Coord & | xyz | ) |
| inline

## ◆ Abs() [3/16]

template<typename T>

Mat3< T > Abs | ( | const Mat3< T > & | m | ) |
| inline

## ◆ Abs() [4/16]

template<typename T>

Mat4< T > Abs | ( | const Mat4< T > & | m | ) |
| inline

## ◆ Abs() [5/16]

template<int SIZE, typename T>

Tuple< SIZE, T > Abs | ( | const Tuple< SIZE, T > & | t | ) |

Returns
  the absolute value of the given Tuple.

## ◆ Abs() [6/16]

template<typename T>

Vec2< T > Abs | ( | const Vec2< T > & | v | ) |
| inline

## ◆ Abs() [7/16]

template<typename T>

Vec3< T > Abs | ( | const Vec3< T > & | v | ) |
| inline

## ◆ Abs() [8/16]

template<typename T>

Vec4< T > Abs | ( | const Vec4< T > & | v | ) |
| inline

## ◆ Abs() [9/16]

double Abs | ( | double | x | ) |
| inline

## ◆ Abs() [10/16]

float Abs | ( | float | x | ) |
| inline

## ◆ Abs() [11/16]

int32_t Abs | ( | int32_t | i | ) |
| inline

Return the absolute value of the given quantity.

## ◆ Abs() [12/16]

int64_t Abs | ( | int64_t | i | ) |
| inline

## ◆ Abs() [13/16]

long double Abs | ( | long double | x | ) |
| inline

## ◆ Abs() [14/16]

template<typename T>

std::enable_if< std::is_same< T, size_t >::value, T >::type Abs | ( | T | i | ) |
| inline

## ◆ Abs() [15/16]

uint32_t Abs | ( | uint32_t | i | ) |
| inline

## ◆ Abs() [16/16]

uint64_t Abs | ( | uint64_t | i | ) |
| inline

## ◆ aim()

template<class MatType>

MatType aim | ( | const Vec3< typename MatType::value_type > & | direction,
|  | const Vec3< typename MatType::value_type > & | vertical )

Return an orientation matrix such that z points along direction, and y is along the direction / vertical plane.

## ◆ angle() [1/2]

template<typename T>

T angle | ( | const Vec2< T > & | v1,
|  | const Vec2< T > & | v2 )
| inline

Angle between two vectors, the result is between [0, pi], e.g. float a = Vec2f::angle(v1,v2);

## ◆ angle() [2/2]

template<typename T>

T angle | ( | const Vec3< T > & | v1,
|  | const Vec3< T > & | v2 )
| inline

Angle between two vectors, the result is between [0, pi], e.g. double a = Vec3d::angle(v1,v2);

## ◆ approxInverse()

OPENVDB_API Mat4d approxInverse | ( | const Mat4d & | mat | ) |

Returns the left pseudoInverse of the input matrix when the 3x3 part is symmetric otherwise it zeros the 3x3 and reverses the translation.

## ◆ bezLerp()

template<typename T, typename T0>

Mat3< T > bezLerp | ( | const Mat3< T0 > & | m1,
|  | const Mat3< T0 > & | m2,
|  | const Mat3< T0 > & | m3,
|  | const Mat3< T0 > & | m4,
|  | T | t )

Interpolate between m1 and m4 by converting m1 ... m4 into quaternions and treating them as control points of a Bezier curve using slerp in place of lerp in the De Castlejeau evaluation algorithm. Just like a cubic Bezier curve, this will interpolate m1 at t = 0 and m4 at t = 1 but in general will not pass through m2 and m3. Unlike a standard Bezier curve this curve will not have the convex hull property. m1 ... m4 must be rotation matrices!

## ◆ biasedGradientSchemeToMenuName()

std::string biasedGradientSchemeToMenuName | ( | BiasedGradientScheme | bgs | ) |
| inline

## ◆ biasedGradientSchemeToString()

std::string biasedGradientSchemeToString | ( | BiasedGradientScheme | bgs | ) |
| inline

## ◆ calculateBounds()

OPENVDB_API void calculateBounds | ( | const Transform & | t,
|  | const Vec3d & | minWS,
|  | const Vec3d & | maxWS,
|  | Vec3d & | minIS,
|  | Vec3d & | maxIS )

Calculate an axis-aligned bounding box in index space from an axis-aligned bounding box in world space.

See also
  Transform::worldToIndex(const BBoxd&) const

## ◆ Cbrt() [1/3]

double Cbrt | ( | double | x | ) |
| inline

## ◆ Cbrt() [2/3]

float Cbrt | ( | float | x | ) |
| inline

Return the cube root of a floating-point value.

## ◆ Cbrt() [3/3]

long double Cbrt | ( | long double | x | ) |
| inline

## ◆ Ceil() [1/3]

int Ceil | ( | double | x | ) |
| inline

## ◆ Ceil() [2/3]

int Ceil | ( | float | x | ) |
| inline

Return the ceiling of x.

## ◆ Ceil() [3/3]

int Ceil | ( | long double | x | ) |
| inline

## ◆ Chop()

template<typename Type>

Type Chop | ( | Type | x,
|  | Type | delta )
| inline

Return x if it is greater or equal in magnitude than delta. Otherwise, return zero.

## ◆ Clamp()

template<typename Type>

Type Clamp | ( | Type | x,
|  | Type | min,
|  | Type | max )
| inline

Return x clamped to [min, max].

## ◆ Clamp01()

template<typename Type>

Type Clamp01 | ( | Type | x | ) |
| inline

Return x clamped to [0, 1].

## ◆ ClampTest01()

template<typename Type>

bool ClampTest01 | ( | Type & | x | ) |
| inline

Return `true` if x is outside [0,1].

## ◆ closestPointOnSegmentToPoint()

OPENVDB_API Vec3d closestPointOnSegmentToPoint | ( | const Vec3d & | a,
|  | const Vec3d & | b,
|  | const Vec3d & | p,
|  | double & | t )

Closest Point on Line Segment to Point. Given segment `ab` and point `p`, return the point on `ab` closest to `p` and `t` the parametric distance to `b`.

Parameters

  a | The segment's first vertex point.
  b | The segment's second vertex point.
  p | Point to compute the closest point on `ab` for.
  t | Parametric distance to `b`.

## ◆ closestPointOnTriangleToPoint()

OPENVDB_API Vec3d closestPointOnTriangleToPoint | ( | const Vec3d & | a,
|  | const Vec3d & | b,
|  | const Vec3d & | c,
|  | const Vec3d & | p,
|  | Vec3d & | uvw )

Closest Point on Triangle to Point. Given a triangle `abc` and a point `p`, return the point on `abc` closest to `p` and the corresponding barycentric coordinates.

Algorithms from "Real-Time Collision Detection" pg 136 to 142 by Christer Ericson. The closest point is obtained by first determining which of the triangles' Voronoi feature regions `p` is in and then computing the orthogonal projection of `p` onto the corresponding feature.

Parameters

  a | The triangle's first vertex point.
  b | The triangle's second vertex point.
  c | The triangle's third vertex point.
  p | Point to compute the closest point on `abc` for.
  uvw | Barycentric coordinates, computed and returned.

## ◆ Cos() [1/2]

double Cos | ( | const double & | x | ) |
| inline

## ◆ Cos() [2/2]

float Cos | ( | const float & | x | ) |
| inline

Return cos x.

## ◆ createFullyDecomposedMap()

OPENVDB_API SharedPtr< FullyDecomposedMap > createFullyDecomposedMap | ( | const Mat4d & | m | ) |

General decomposition of a Matrix into a Unitary (e.g. rotation) following a Symmetric (e.g. stretch & shear)

## ◆ createPolarDecomposedMap()

OPENVDB_API SharedPtr< PolarDecomposedMap > createPolarDecomposedMap | ( | const Mat3d & | m | ) |

Decomposes a general linear into translation following polar decomposition.

T U S where:

T: Translation U: Unitary (rotation or reflection) S: Symmetric

Note
  : the Symmetric is automatically decomposed into Q D Q^T, where Q is rotation and D is diagonal.

## ◆ createSymmetricMap()

OPENVDB_API SharedPtr< SymmetricMap > createSymmetricMap | ( | const Mat3d & | m | ) |

Utility methods.

Create a SymmetricMap from a symmetric matrix. Decomposes the map into Rotation Diagonal Rotation^T

## ◆ cwiseAdd() [1/4]

template<typename Type1, typename Type2>

Mat3< Type1 > cwiseAdd | ( | const Mat3< Type1 > & | m,
|  | const Type2 | s )
| inline

## ◆ cwiseAdd() [2/4]

template<typename Type1, typename Type2>

Mat4< Type1 > cwiseAdd | ( | const Mat4< Type1 > & | m,
|  | const Type2 | s )
| inline

## ◆ cwiseAdd() [3/4]

template<>

auto cwiseAdd | ( | const math::Vec3< math::half > & | v,
|  | const float | s )
| inline

## ◆ cwiseAdd() [4/4]

template<typename Type1, typename Type2>

auto cwiseAdd | ( | const Type1 & | v,
|  | const Type2 | s )
| inline

Componentwise adder for POD types.

## ◆ cwiseGreaterThan() [1/4]

template<typename T>

bool cwiseGreaterThan | ( | const Mat3< T > & | m0,
|  | const Mat3< T > & | m1 )
| inline

## ◆ cwiseGreaterThan() [2/4]

template<typename T>

bool cwiseGreaterThan | ( | const Mat4< T > & | m0,
|  | const Mat4< T > & | m1 )
| inline

## ◆ cwiseGreaterThan() [3/4]

template<unsigned SIZE, typename T>

bool cwiseGreaterThan | ( | const Mat< SIZE, T > & | m0,
|  | const Mat< SIZE, T > & | m1 )
| inline

Returns
  true if m0 > m1, comparing components in order of significance.

## ◆ cwiseGreaterThan() [4/4]

template<typename Type1, typename Type2>

bool cwiseGreaterThan | ( | const Type1 & | a,
|  | const Type2 & | b )
| inline

Componentwise greater than for POD types.

## ◆ cwiseLessThan() [1/4]

template<typename T>

bool cwiseLessThan | ( | const Mat3< T > & | m0,
|  | const Mat3< T > & | m1 )
| inline

## ◆ cwiseLessThan() [2/4]

template<typename T>

bool cwiseLessThan | ( | const Mat4< T > & | m0,
|  | const Mat4< T > & | m1 )
| inline

## ◆ cwiseLessThan() [3/4]

template<unsigned SIZE, typename T>

bool cwiseLessThan | ( | const Mat< SIZE, T > & | m0,
|  | const Mat< SIZE, T > & | m1 )
| inline

Returns
  true if m0 < m1, comparing components in order of significance.

## ◆ cwiseLessThan() [4/4]

template<typename Type1, typename Type2>

bool cwiseLessThan | ( | const Type1 & | a,
|  | const Type2 & | b )
| inline

Componentwise less than for POD types.

## ◆ diagonalizeSymmetricMatrix()

template<typename T>

bool diagonalizeSymmetricMatrix | ( | const Mat3< T > & | input,
|  | Mat3< T > & | Q,
|  | Vec3< T > & | D,
|  | unsigned int | MAX_ITERATIONS = 250 )
| inline

Use Jacobi iterations to decompose a symmetric 3x3 matrix (diagonalize and compute eigenvectors)

This is based on the "Efficient numerical diagonalization of Hermitian 3x3 matrices" Joachim Kopp. arXiv.org preprint: physics/0610206 with the addition of largest pivot

## ◆ doProcessTypedMap() [1/2]

template<typename ResolvedMapType, typename OpType>

void doProcessTypedMap | ( | const Transform & | transform,
|  | OpType & | op )
| inline

Helper function used internally by processTypedMap()

## ◆ doProcessTypedMap() [2/2]

template<typename ResolvedMapType, typename OpType>

void doProcessTypedMap | ( | Transform & | transform,
|  | OpType & | op )
| inline

Helper function used internally by processTypedMap()

## ◆ doubleToInt64()

int64_t doubleToInt64 | ( | const double | d | ) |
| inline

## ◆ dsSchemeToMenuName()

std::string dsSchemeToMenuName | ( | DScheme | dss | ) |
| inline

## ◆ dsSchemeToString()

std::string dsSchemeToString | ( | DScheme | dss | ) |
| inline

## ◆ EuclideanRemainder()

template<typename Type>

Type EuclideanRemainder | ( | Type | x | ) |
| inline

Return the euclidean remainder of x. Note unlike % operator this will always return a positive result

## ◆ eulerAngles()

template<class MatType>

Vec3< typename MatType::value_type > eulerAngles | ( | const MatType & | mat,
|  | RotationOrder | rotationOrder,
|  | typename MatType::value_type | eps = static_cast<typename MatType::value_type>(1.0e-8) )

Return the Euler angles composing the given rotation matrix.

Optional axes arguments describe in what order elementary rotations are applied. Note that in our convention, XYZ means Rz * Ry * Rx. Because we are using rows rather than columns to represent the local axes of a coordinate frame, the interpretation from a local reference point of view is to first rotate about the x axis, then about the newly rotated y axis, and finally by the new local z axis. From a fixed reference point of view, the interpretation is to rotate about the stationary world z, y, and x axes respectively.

Irrespective of the Euler angle convention, in the case of distinct axes, eulerAngles() returns the x, y, and z angles in the corresponding x, y, z components of the returned Vec3. For the XZX convention, the left X value is returned in Vec3.x, and the right X value in Vec3.y. For the ZXZ convention the left Z value is returned in Vec3.z and the right Z value in Vec3.y

Examples of reconstructing r from its Euler angle decomposition

v = eulerAngles(r, ZYX_ROTATION); rx.setToRotation(Vec3d(1,0,0), v[0]); ry.setToRotation(Vec3d(0,1,0), v[1]); rz.setToRotation(Vec3d(0,0,1), v[2]); r = rx * ry * rz;

v = eulerAngles(r, ZXZ_ROTATION); rz1.setToRotation(Vec3d(0,0,1), v[2]); rx.setToRotation (Vec3d(1,0,0), v[0]); rz2.setToRotation(Vec3d(0,0,1), v[1]); r = rz2 * rx * rz1;

v = eulerAngles(r, XZX_ROTATION); rx1.setToRotation (Vec3d(1,0,0), v[0]); rx2.setToRotation (Vec3d(1,0,0), v[1]); rz.setToRotation (Vec3d(0,0,1), v[2]); r = rx2 * rz * rx1;

## ◆ Exp() [1/4]

template<typename Type>

Type Exp | ( | const Type & | x | ) |
| inline

Return ex.

## ◆ Exp() [2/4]

template<typename T>

Vec2< T > Exp | ( | Vec2< T > | v | ) |
| inline

Return a vector with the exponent applied to each of the components of the input vector.

## ◆ Exp() [3/4]

template<typename T>

Vec3< T > Exp | ( | Vec3< T > | v | ) |
| inline

Return a vector with the exponent applied to each of the components of the input vector.

## ◆ Exp() [4/4]

template<typename T>

Vec4< T > Exp | ( | Vec4< T > | v | ) |
| inline

Return a vector with the exponent applied to each of the components of the input vector.

## ◆ floatToInt32()

int32_t floatToInt32 | ( | const float | f | ) |
| inline

## ◆ Floor() [1/3]

int Floor | ( | double | x | ) |
| inline

## ◆ Floor() [2/3]

int Floor | ( | float | x | ) |
| inline

Return the floor of x.

## ◆ Floor() [3/3]

int Floor | ( | long double | x | ) |
| inline

## ◆ FractionalPart()

template<typename Type>

Type FractionalPart | ( | Type | x | ) |
| inline

Return the fractional part of x.

## ◆ getScale()

template<class MatType>

Vec3< typename MatType::value_type > getScale | ( | const MatType & | mat | ) |

Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.

## ◆ GodunovsNormSqrd() [1/2]

template<typename Real>

Real GodunovsNormSqrd | ( | bool | isOutside,
|  | const Vec3< Real > & | gradient_m,
|  | const Vec3< Real > & | gradient_p )
| inline

## ◆ GodunovsNormSqrd() [2/2]

template<typename Real>

Real GodunovsNormSqrd | ( | bool | isOutside,
|  | Real | dP_xm,
|  | Real | dP_xp,
|  | Real | dP_ym,
|  | Real | dP_yp,
|  | Real | dP_zm,
|  | Real | dP_zp )
| inline

## ◆ hasTranslation()

template<typename T>

bool hasTranslation | ( | const Mat4< T > & | m | ) |
| inline

## ◆ IntegerPart()

template<typename Type>

Type IntegerPart | ( | Type | x | ) |
| inline

Return the integer part of x.

## ◆ Inv()

template<typename Type>

Type Inv | ( | Type | x | ) |
| inline

Return the inverse of x.

## ◆ isAffine()

template<typename T>

bool isAffine | ( | const Mat4< T > & | m | ) |
| inline

## ◆ isApproxEqual() [1/8]

template<typename Type>

bool isApproxEqual | ( | const Type & | a,
|  | const Type & | b )
| inline

Return `true` if a is equal to b to within the default floating-point comparison tolerance.

## ◆ isApproxEqual() [2/8]

template<typename Type>

bool isApproxEqual | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | tolerance )
| inline

Return `true` if a is equal to b to within the given tolerance.

## ◆ isApproxEqual() [3/8]

template<typename T>

bool isApproxEqual | ( | const Vec2< T > & | a,
|  | const Vec2< T > & | b )
| inline

## ◆ isApproxEqual() [4/8]

template<typename T>

bool isApproxEqual | ( | const Vec2< T > & | a,
|  | const Vec2< T > & | b,
|  | const Vec2< T > & | eps )
| inline

## ◆ isApproxEqual() [5/8]

template<typename T>

bool isApproxEqual | ( | const Vec3< T > & | a,
|  | const Vec3< T > & | b )
| inline

## ◆ isApproxEqual() [6/8]

template<typename T>

bool isApproxEqual | ( | const Vec3< T > & | a,
|  | const Vec3< T > & | b,
|  | const Vec3< T > & | eps )
| inline

## ◆ isApproxEqual() [7/8]

template<typename T>

bool isApproxEqual | ( | const Vec4< T > & | a,
|  | const Vec4< T > & | b )
| inline

## ◆ isApproxEqual() [8/8]

template<typename T>

bool isApproxEqual | ( | const Vec4< T > & | a,
|  | const Vec4< T > & | b,
|  | const Vec4< T > & | eps )
| inline

## ◆ isApproxEqual< bool >() [1/2]

template<>

bool isApproxEqual< bool > | ( | const bool & | a,
|  | const bool & | b )
| inline

## ◆ isApproxEqual< bool >() [2/2]

template<>

bool isApproxEqual< bool > | ( | const bool & | a,
|  | const bool & | b,
|  | const bool & | )
| inline

## ◆ isApproxEqual< std::string >() [1/2]

template<>

bool isApproxEqual< std::string > | ( | const std::string & | a,
|  | const std::string & | b )
| inline

## ◆ isApproxEqual< std::string >() [2/2]

template<>

bool isApproxEqual< std::string > | ( | const std::string & | a,
|  | const std::string & | b,
|  | const std::string & | )
| inline

## ◆ isApproxLarger()

template<typename Type>

bool isApproxLarger | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | tolerance )
| inline

Return `true` if a is larger than b to within the given tolerance, i.e., if b - a < tolerance.

## ◆ isApproxZero() [1/2]

template<typename Type>

bool isApproxZero | ( | const Type & | x | ) |
| inline

Return `true` if x is equal to zero to within the default floating-point comparison tolerance.

## ◆ isApproxZero() [2/2]

template<typename Type>

bool isApproxZero | ( | const Type & | x,
|  | const Type & | tolerance )
| inline

Return `true` if x is equal to zero to within the given tolerance.

## ◆ isDiagonal()

template<typename MatType>

bool isDiagonal | ( | const MatType & | mat | ) |
| inline

Determine if a matrix is diagonal.

## ◆ isExactlyEqual()

template<typename T0, typename T1>

bool isExactlyEqual | ( | const T0 & | a,
|  | const T1 & | b )
| inline

Return `true` if a is exactly equal to b.

## ◆ isFinite() [1/3]

bool isFinite | ( | const float | x | ) |
| inline

Return `true` if x is finite.

## ◆ isFinite() [2/3]

template<int SIZE, typename T>

bool isFinite | ( | const Tuple< SIZE, T > & | t | ) |
| inline

Return `true` if no Nan or Inf values are present.

## ◆ isFinite() [3/3]

template<typename Type, typename std::enable_if< std::is_arithmetic< Type >::value, int >::type = 0>

bool isFinite | ( | const Type & | x | ) |
| inline

Return `true` if x is finite.

## ◆ isIdentity()

template<typename MatType>

bool isIdentity | ( | const MatType & | m | ) |
| inline

Determine if a matrix is an identity matrix.

## ◆ isInfinite() [1/3]

bool isInfinite | ( | const float | x | ) |
| inline

Return `true` if x is an infinity value (either positive infinity or negative infinity).

## ◆ isInfinite() [2/3]

template<int SIZE, typename T>

bool isInfinite | ( | const Tuple< SIZE, T > & | t | ) |
| inline

Return `true` if an Inf is present in the tuple.

## ◆ isInfinite() [3/3]

template<typename Type, typename std::enable_if< std::is_arithmetic< Type >::value, int >::type = 0>

bool isInfinite | ( | const Type & | x | ) |
| inline

Return `true` if x is an infinity value (either positive infinity or negative infinity).

## ◆ isInvertible()

template<typename MatType>

bool isInvertible | ( | const MatType & | m | ) |
| inline

Determine if a matrix is invertible.

## ◆ isNan() [1/3]

bool isNan | ( | const float | x | ) |
| inline

Return `true` if x is a NaN (Not-A-Number) value.

## ◆ isNan() [2/3]

template<int SIZE, typename T>

bool isNan | ( | const Tuple< SIZE, T > & | t | ) |
| inline

Return `true` if a Nan is present in the tuple.

## ◆ isNan() [3/3]

template<typename Type, typename std::enable_if< std::is_arithmetic< Type >::value, int >::type = 0>

bool isNan | ( | const Type & | x | ) |
| inline

Return `true` if x is a NaN (Not-A-Number) value.

## ◆ isNegative()

template<typename Type>

bool isNegative | ( | const Type & | x | ) |
| inline

Return `true` if x is less than zero.

## ◆ isNegative< bool >()

template<>

bool isNegative< bool > | ( | const bool & |  | ) |
| inline

## ◆ isRelOrApproxEqual() [1/2]

template<>

bool isRelOrApproxEqual | ( | const bool & | a,
|  | const bool & | b,
|  | const bool & | ,
|  | const bool & | )
| inline

## ◆ isRelOrApproxEqual() [2/2]

template<typename Type>

bool isRelOrApproxEqual | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | absTol,
|  | const Type & | relTol )
| inline

## ◆ isSymmetric()

template<typename MatType>

bool isSymmetric | ( | const MatType & | m | ) |
| inline

Determine if a matrix is symmetric.

This implicitly uses math::isApproxEqual() to determine equality.

## ◆ isUlpsEqual() [1/2]

bool isUlpsEqual | ( | const double | aLeft,
|  | const double | aRight,
|  | const int64_t | aUnitsInLastPlace )
| inline

## ◆ isUlpsEqual() [2/2]

bool isUlpsEqual | ( | const float | aLeft,
|  | const float | aRight,
|  | const int32_t | aUnitsInLastPlace )
| inline

## ◆ isUnitary()

template<typename MatType>

bool isUnitary | ( | const MatType & | m | ) |
| inline

Determine if a matrix is unitary (i.e., rotation or reflection).

## ◆ isZero() [1/2]

template<int SIZE, typename T>

bool isZero | ( | const Tuple< SIZE, T > & | t | ) |
| inline

Return `true` if all elements are exactly equal to zero.

## ◆ isZero() [2/2]

template<typename Type>

bool isZero | ( | const Type & | x | ) |
| inline

Return `true` if x is exactly equal to zero.

## ◆ lInfinityNorm()

template<typename MatType>

MatType::ValueType lInfinityNorm | ( | const MatType & | matrix | ) |

Return the L∞ norm of an N×N matrix.

## ◆ Log() [1/3]

template<typename T>

Vec2< T > Log | ( | Vec2< T > | v | ) |
| inline

Return a vector with log applied to each of the components of the input vector.

## ◆ Log() [2/3]

template<typename T>

Vec3< T > Log | ( | Vec3< T > | v | ) |
| inline

Return a vector with log applied to each of the components of the input vector.

## ◆ Log() [3/3]

template<typename T>

Vec4< T > Log | ( | Vec4< T > | v | ) |
| inline

Return a vector with log applied to each of the components of the input vector.

## ◆ lOneNorm()

template<typename MatType>

MatType::ValueType lOneNorm | ( | const MatType & | matrix | ) |

Return the L1 norm of an N×N matrix.

## ◆ Max() [1/7]

template<typename Type>

const Type & Max | ( | const Type & | a,
|  | const Type & | b )
| inline

Return the maximum of two values.

## ◆ Max() [2/7]

template<typename Type>

const Type & Max | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c )
| inline

Return the maximum of three values.

## ◆ Max() [3/7]

template<typename Type>

const Type & Max | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d )
| inline

Return the maximum of four values.

## ◆ Max() [4/7]

template<typename Type>

const Type & Max | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d,
|  | const Type & | e )
| inline

Return the maximum of five values.

## ◆ Max() [5/7]

template<typename Type>

const Type & Max | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d,
|  | const Type & | e,
|  | const Type & | f )
| inline

Return the maximum of six values.

## ◆ Max() [6/7]

template<typename Type>

const Type & Max | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d,
|  | const Type & | e,
|  | const Type & | f,
|  | const Type & | g )
| inline

Return the maximum of seven values.

## ◆ Max() [7/7]

template<typename Type>

const Type & Max | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d,
|  | const Type & | e,
|  | const Type & | f,
|  | const Type & | g,
|  | const Type & | h )
| inline

Return the maximum of eight values.

## ◆ maxComponent() [1/3]

template<typename T>

Vec2< T > maxComponent | ( | const Vec2< T > & | v1,
|  | const Vec2< T > & | v2 )
| inline

Return component-wise maximum of the two vectors.

## ◆ maxComponent() [2/3]

template<typename T>

Vec3< T > maxComponent | ( | const Vec3< T > & | v1,
|  | const Vec3< T > & | v2 )
| inline

Return component-wise maximum of the two vectors.

## ◆ maxComponent() [3/3]

template<typename T>

Vec4< T > maxComponent | ( | const Vec4< T > & | v1,
|  | const Vec4< T > & | v2 )
| inline

Return component-wise maximum of the two vectors.

## ◆ MaxIndex()

template<typename Vec3T>

size_t MaxIndex | ( | const Vec3T & | v | ) |

Return the index [0,1,2] of the largest value in a 3D vector.

Note
  This methods assumes operator[] exists.

The return value corresponds to the largest index of the of the largest vector components.

## ◆ Min() [1/7]

template<typename Type>

const Type & Min | ( | const Type & | a,
|  | const Type & | b )
| inline

Return the minimum of two values.

## ◆ Min() [2/7]

template<typename Type>

const Type & Min | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c )
| inline

Return the minimum of three values.

## ◆ Min() [3/7]

template<typename Type>

const Type & Min | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d )
| inline

Return the minimum of four values.

## ◆ Min() [4/7]

template<typename Type>

const Type & Min | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d,
|  | const Type & | e )
| inline

Return the minimum of five values.

## ◆ Min() [5/7]

template<typename Type>

const Type & Min | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d,
|  | const Type & | e,
|  | const Type & | f )
| inline

Return the minimum of six values.

## ◆ Min() [6/7]

template<typename Type>

const Type & Min | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d,
|  | const Type & | e,
|  | const Type & | f,
|  | const Type & | g )
| inline

Return the minimum of seven values.

## ◆ Min() [7/7]

template<typename Type>

const Type & Min | ( | const Type & | a,
|  | const Type & | b,
|  | const Type & | c,
|  | const Type & | d,
|  | const Type & | e,
|  | const Type & | f,
|  | const Type & | g,
|  | const Type & | h )
| inline

Return the minimum of eight values.

## ◆ minComponent() [1/3]

template<typename T>

Vec2< T > minComponent | ( | const Vec2< T > & | v1,
|  | const Vec2< T > & | v2 )
| inline

Return component-wise minimum of the two vectors.

Remarks
  We are switching to a more explicit name because the semantics are different from std::min/max. In that case, the function returns a reference to one of the objects based on a comparator. Here, we must fabricate a new object which might not match either of the inputs.

## ◆ minComponent() [2/3]

template<typename T>

Vec3< T > minComponent | ( | const Vec3< T > & | v1,
|  | const Vec3< T > & | v2 )
| inline

Return component-wise minimum of the two vectors.

Remarks
  We are switching to a more explicit name because the semantics are different from std::min/max. In that case, the function returns a reference to one of the objects based on a comparator. Here, we must fabricate a new object which might not match either of the inputs.

## ◆ minComponent() [3/3]

template<typename T>

Vec4< T > minComponent | ( | const Vec4< T > & | v1,
|  | const Vec4< T > & | v2 )
| inline

Return component-wise minimum of the two vectors.

Remarks
  We are switching to a more explicit name because the semantics are different from std::min/max. In that case, the function returns a reference to one of the objects based on a comparator. Here, we must fabricate a new object which might not match either of the inputs.

## ◆ MinIndex()

template<typename Vec3T>

size_t MinIndex | ( | const Vec3T & | v | ) |

Return the index [0,1,2] of the smallest value in a 3D vector.

Note
  This methods assumes operator[] exists.

The return value corresponds to the largest index of the of the smallest vector components.

## ◆ Mod() [1/4]

double Mod | ( | double | x,
|  | double | y )
| inline

## ◆ Mod() [2/4]

float Mod | ( | float | x,
|  | float | y )
| inline

## ◆ Mod() [3/4]

int Mod | ( | int | x,
|  | int | y )
| inline

Return the remainder of x / y.

## ◆ Mod() [4/4]

long double Mod | ( | long double | x,
|  | long double | y )
| inline

## ◆ negative() [1/3]

template<>

bool negative | ( | const bool & | val | ) |
| inline

Return the negation of the given boolean.

## ◆ negative() [2/3]

template<>

std::string negative | ( | const std::string & | val | ) |
| inline

Return the "negation" of the given string.

## ◆ negative() [3/3]

template<typename T>

T negative | ( | const T & | val | ) |
| inline

Return the unary negation of the given value.

Note
  A negative<T>() specialization must be defined for each ValueType T for which unary negation is not defined.

## ◆ operator!=() [1/4]

template<typename T0, typename T1>

bool operator!= | ( | const Vec3< T0 > & | v0,
|  | const Vec3< T1 > & | v1 )
| inline

Inequality operator, does exact floating point comparisons.

## ◆ operator!=() [2/4]

template<typename T0, typename T1>

bool operator!= | ( | const Vec4< T0 > & | v0,
|  | const Vec4< T1 > & | v1 )
| inline

Inequality operator, does exact floating point comparisons.

## ◆ operator*() [1/22]

template<typename T0, typename T1>

Mat3< typename promote< T0, T1 >::type > operator* | ( | const Mat3< T0 > & | m0,
|  | const Mat3< T1 > & | m1 )

Multiply m0 by m1 and return the resulting matrix.

## ◆ operator*() [2/22]

template<typename S, typename T>

Vec2< typename promote< S, T >::type > operator* | ( | const Vec2< T > & | v,
|  | S | scalar )
| inline

Multiply each element of the given vector by scalar and return the result.

## ◆ operator*() [3/22]

template<typename T0, typename T1>

Vec2< typename promote< T0, T1 >::type > operator* | ( | const Vec2< T0 > & | v0,
|  | const Vec2< T1 > & | v1 )
| inline

Multiply corresponding elements of v0 and v1 and return the result.

## ◆ operator*() [4/22]

template<typename S, typename T>

Vec3< typename promote< S, T >::type > operator* | ( | const Vec3< T > & | v,
|  | S | scalar )
| inline

Multiply each element of the given vector by scalar and return the result.

## ◆ operator*() [5/22]

template<typename T0, typename T1>

Vec3< typename promote< T0, T1 >::type > operator* | ( | const Vec3< T0 > & | v0,
|  | const Vec3< T1 > & | v1 )
| inline

Multiply corresponding elements of v0 and v1 and return the result.

## ◆ operator*() [6/22]

template<typename S, typename T>

Vec4< typename promote< S, T >::type > operator* | ( | const Vec4< T > & | v,
|  | S | scalar )
| inline

Multiply each element of the given vector by scalar and return the result.

## ◆ operator*() [7/22]

template<typename T0, typename T1>

Vec4< typename promote< T0, T1 >::type > operator* | ( | const Vec4< T0 > & | v0,
|  | const Vec4< T1 > & | v1 )
| inline

Multiply corresponding elements of v0 and v1 and return the result.

## ◆ operator*() [8/22]

template<typename S, typename T>

Quat< T > operator* | ( | S | scalar,
|  | const Quat< T > & | q )

Multiply each element of the given quaternion by scalar and return the result.

## ◆ operator*() [9/22]

template<typename S, typename T>

Vec2< typename promote< S, T >::type > operator* | ( | S | scalar,
|  | const Vec2< T > & | v )
| inline

Multiply each element of the given vector by scalar and return the result.

## ◆ operator*() [10/22]

template<typename S, typename T>

Vec3< typename promote< S, T >::type > operator* | ( | S | scalar,
|  | const Vec3< T > & | v )
| inline

Multiply each element of the given vector by scalar and return the result.

## ◆ operator*() [11/22]

template<typename S, typename T>

Vec4< typename promote< S, T >::type > operator* | ( | S | scalar,
|  | const Vec4< T > & | v )
| inline

Multiply each element of the given vector by scalar and return the result.

## ◆ operator+() [1/14]

template<typename T>

Vec3< typename promote< T, typename Coord::ValueType >::type > operator+ | ( | const Coord & | v1,
|  | const Vec3< T > & | v0 )
| inline

## ◆ operator+() [2/14]

std::string operator+ | ( | const std::string & | s,
|  | bool | )
| inline

Needed to support the (zeroVal<ValueType>() + val) idiom when `ValueType` is `std::string`.

## ◆ operator+() [3/14]

std::string operator+ | ( | const std::string & | s,
|  | double | )
| inline

## ◆ operator+() [4/14]

std::string operator+ | ( | const std::string & | s,
|  | float | )
| inline

## ◆ operator+() [5/14]

std::string operator+ | ( | const std::string & | s,
|  | int | )
| inline

## ◆ operator+() [6/14]

template<typename S, typename T>

Vec2< typename promote< S, T >::type > operator+ | ( | const Vec2< T > & | v,
|  | S | scalar )
| inline

Add scalar to each element of the given vector and return the result.

## ◆ operator+() [7/14]

template<typename T0, typename T1>

Vec2< typename promote< T0, T1 >::type > operator+ | ( | const Vec2< T0 > & | v0,
|  | const Vec2< T1 > & | v1 )
| inline

Add corresponding elements of v0 and v1 and return the result.

## ◆ operator+() [8/14]

template<typename S, typename T>

Vec3< typename promote< S, T >::type > operator+ | ( | const Vec3< T > & | v,
|  | S | scalar )
| inline

Add scalar to each element of the given vector and return the result.

## ◆ operator+() [9/14]

template<typename T>

Vec3< typename promote< T, typename Coord::ValueType >::type > operator+ | ( | const Vec3< T > & | v0,
|  | const Coord & | v1 )
| inline

Allow a Coord to be added to or subtracted from a Vec3.

## ◆ operator+() [10/14]

template<typename T0, typename T1>

Vec3< typename promote< T0, T1 >::type > operator+ | ( | const Vec3< T0 > & | v0,
|  | const Vec3< T1 > & | v1 )
| inline

Add corresponding elements of v0 and v1 and return the result.

## ◆ operator+() [11/14]

template<typename S, typename T>

Vec4< typename promote< S, T >::type > operator+ | ( | const Vec4< T > & | v,
|  | S | scalar )
| inline

Add scalar to each element of the given vector and return the result.

## ◆ operator+() [12/14]

template<typename T0, typename T1>

Vec4< typename promote< T0, T1 >::type > operator+ | ( | const Vec4< T0 > & | v0,
|  | const Vec4< T1 > & | v1 )
| inline

Add corresponding elements of v0 and v1 and return the result.

## ◆ operator-() [1/10]

template<typename T>

Vec3< typename promote< T, Coord::ValueType >::type > operator- | ( | const Coord & | v1,
|  | const Vec3< T > & | v0 )
| inline

## ◆ operator-() [2/10]

template<typename S, typename T>

Vec2< typename promote< S, T >::type > operator- | ( | const Vec2< T > & | v,
|  | S | scalar )
| inline

Subtract scalar from each element of the given vector and return the result.

## ◆ operator-() [3/10]

template<typename T0, typename T1>

Vec2< typename promote< T0, T1 >::type > operator- | ( | const Vec2< T0 > & | v0,
|  | const Vec2< T1 > & | v1 )
| inline

Subtract corresponding elements of v0 and v1 and return the result.

## ◆ operator-() [4/10]

template<typename S, typename T>

Vec3< typename promote< S, T >::type > operator- | ( | const Vec3< T > & | v,
|  | S | scalar )
| inline

Subtract scalar from each element of the given vector and return the result.

## ◆ operator-() [5/10]

template<typename T>

Vec3< typename promote< T, Coord::ValueType >::type > operator- | ( | const Vec3< T > & | v0,
|  | const Coord & | v1 )
| inline

Allow a Coord to be subtracted from a Vec3.

## ◆ operator-() [6/10]

template<typename T0, typename T1>

Vec3< typename promote< T0, T1 >::type > operator- | ( | const Vec3< T0 > & | v0,
|  | const Vec3< T1 > & | v1 )
| inline

Subtract corresponding elements of v0 and v1 and return the result.

## ◆ operator-() [7/10]

template<typename S, typename T>

Vec4< typename promote< S, T >::type > operator- | ( | const Vec4< T > & | v,
|  | S | scalar )
| inline

Subtract scalar from each element of the given vector and return the result.

## ◆ operator-() [8/10]

template<typename T0, typename T1>

Vec4< typename promote< T0, T1 >::type > operator- | ( | const Vec4< T0 > & | v0,
|  | const Vec4< T1 > & | v1 )
| inline

Subtract corresponding elements of v0 and v1 and return the result.

## ◆ operator/() [1/9]

template<typename S, typename T>

Vec2< typename promote< S, T >::type > operator/ | ( | const Vec2< T > & | v,
|  | S | scalar )
| inline

Divide each element of the given vector by scalar and return the result.

## ◆ operator/() [2/9]

template<typename T0, typename T1>

Vec2< typename promote< T0, T1 >::type > operator/ | ( | const Vec2< T0 > & | v0,
|  | const Vec2< T1 > & | v1 )
| inline

Divide corresponding elements of v0 and v1 and return the result.

## ◆ operator/() [3/9]

template<typename S, typename T>

Vec3< typename promote< S, T >::type > operator/ | ( | const Vec3< T > & | v,
|  | S | scalar )
| inline

Divide each element of the given vector by scalar and return the result.

## ◆ operator/() [4/9]

template<typename T0, typename T1>

Vec3< typename promote< T0, T1 >::type > operator/ | ( | const Vec3< T0 > & | v0,
|  | const Vec3< T1 > & | v1 )
| inline

Divide corresponding elements of v0 and v1 and return the result.

## ◆ operator/() [5/9]

template<typename S, typename T>

Vec4< typename promote< S, T >::type > operator/ | ( | const Vec4< T > & | v,
|  | S | scalar )
| inline

Divide each element of the given vector by scalar and return the result.

## ◆ operator/() [6/9]

template<typename T0, typename T1>

Vec4< typename promote< T0, T1 >::type > operator/ | ( | const Vec4< T0 > & | v0,
|  | const Vec4< T1 > & | v1 )
| inline

Divide corresponding elements of v0 and v1 and return the result.

## ◆ operator/() [7/9]

template<typename S, typename T>

Vec2< typename promote< S, T >::type > operator/ | ( | S | scalar,
|  | const Vec2< T > & | v )
| inline

Divide scalar by each element of the given vector and return the result.

## ◆ operator/() [8/9]

template<typename S, typename T>

Vec3< typename promote< S, T >::type > operator/ | ( | S | scalar,
|  | const Vec3< T > & | v )
| inline

Divide scalar by each element of the given vector and return the result.

## ◆ operator/() [9/9]

template<typename S, typename T>

Vec4< typename promote< S, T >::type > operator/ | ( | S | scalar,
|  | const Vec4< T > & | v )
| inline

Divide scalar by each element of the given vector and return the result.

## ◆ operator<()

template<int SIZE, typename T0, typename T1>

bool operator< | ( | const Tuple< SIZE, T0 > & | t0,
|  | const Tuple< SIZE, T1 > & | t1 )

Returns
  true if t0 < t1, comparing components in order of significance.

## ◆ operator<<() [1/7]

OPENVDB_API std::ostream & operator<< | ( | std::ostream & | ,
|  | const Transform & | )

## ◆ operator<<() [2/7]

template<typename Vec3T>

std::ostream & operator<< | ( | std::ostream & | os,
|  | const BBox< Vec3T > & | b )
| inline

## ◆ operator<<() [3/7]

std::ostream & operator<< | ( | std::ostream & | os,
|  | const Coord & | xyz )
| inline

## ◆ operator<<() [4/7]

std::ostream & operator<< | ( | std::ostream & | os,
|  | const CoordBBox & | b )
| inline

## ◆ operator<<() [5/7]

template<typename RayT, Index Log2Dim>

std::ostream & operator<< | ( | std::ostream & | os,
|  | const DDA< RayT, Log2Dim > & | dda )
| inline

Output streaming of the Ray class.

Note
  Primarily intended for debugging.

## ◆ operator<<() [6/7]

template<typename RealT>

std::ostream & operator<< | ( | std::ostream & | os,
|  | const Ray< RealT > & | r )
| inline

Output streaming of the Ray class.

Note
  Primarily intended for debugging.

## ◆ operator<<() [7/7]

template<int SIZE, typename T>

std::ostream & operator<< | ( | std::ostream & | ostr,
|  | const Tuple< SIZE, T > & | classname )

Write a Tuple to an output stream.

## ◆ operator==() [1/4]

template<typename T0, typename T1>

bool operator== | ( | const Vec3< T0 > & | v0,
|  | const Vec3< T1 > & | v1 )
| inline

Equality operator, does exact floating point comparisons.

## ◆ operator==() [2/4]

template<typename T0, typename T1>

bool operator== | ( | const Vec4< T0 > & | v0,
|  | const Vec4< T1 > & | v1 )
| inline

Equality operator, does exact floating point comparisons.

## ◆ operator>()

template<int SIZE, typename T0, typename T1>

bool operator> | ( | const Tuple< SIZE, T0 > & | t0,
|  | const Tuple< SIZE, T1 > & | t1 )

Returns
  true if t0 > t1, comparing components in order of significance.

## ◆ orthonormalize() [1/2]

template<typename T>

void orthonormalize | ( | Vec2< T > & | v1,
|  | Vec2< T > & | v2 )
| inline

Orthonormalize vectors v1 and v2 and store back the resulting basis e.g. Vec2f::orthonormalize(v1,v2);

## ◆ orthonormalize() [2/2]

template<typename T>

void orthonormalize | ( | Vec3< T > & | v1,
|  | Vec3< T > & | v2,
|  | Vec3< T > & | v3 )
| inline

Orthonormalize vectors v1, v2 and v3 and store back the resulting basis e.g. Vec3d::orthonormalize(v1,v2,v3);

## ◆ outerProduct()

template<typename T>

Mat3< T > outerProduct | ( | const Vec3< T > & | v1,
|  | const Vec3< T > & | v2 )

Returns outer product of v1, v2, i.e. v1 v2^T if v1 and v2 are column vectors, e.g. M = Mat3f::outerproduct(v1,v2);

## ◆ padMat4()

template<class MatType>

MatType & padMat4 | ( | MatType & | dest | ) |
| inline

Write 0s along Mat4's last row and column, and a 1 on its diagonal.

Useful initialization when we're initializing just the 3×3 block.

## ◆ pi() [1/4]

template<typename T>

T pi | ( |  | ) |
| inline constexpr

Pi constant taken from Boost to match old behaviour.

Note
  Available in C++20

## ◆ pi() [2/4]

template<>

float pi | ( |  | ) |
| inline constexpr

## ◆ pi() [3/4]

template<>

double pi | ( |  | ) |
| inline constexpr

## ◆ pi() [4/4]

template<>

long double pi | ( |  | ) |
| inline constexpr

## ◆ polarDecomposition()

template<typename MatType>

bool polarDecomposition | ( | const MatType & | input,
|  | MatType & | unitary,
|  | MatType & | positive_hermitian,
|  | unsigned int | MAX_ITERATIONS = 100 )

Decompose an invertible 3×3 matrix into a unitary matrix followed by a symmetric matrix (positive semi-definite Hermitian), i.e., M = U * S.

If det(U) = 1 it is a rotation, otherwise det(U) = -1, meaning there is some part reflection. See "Computing the polar decomposition with applications" Higham, N.J. - SIAM J. Sc. Stat Comput 7(4):1160-1174

## ◆ Pow() [1/3]

double Pow | ( | double | b,
|  | double | e )
| inline

## ◆ Pow() [2/3]

float Pow | ( | float | b,
|  | float | e )
| inline

Return be.

## ◆ Pow() [3/3]

template<typename Type>

Type Pow | ( | Type | x,
|  | int | n )

Return xn.

## ◆ Pow2()

template<typename Type>

Type Pow2 | ( | Type | x | ) |
| inline

Return x2.

## ◆ Pow3()

template<typename Type>

Type Pow3 | ( | Type | x | ) |
| inline

Return x3.

## ◆ Pow4()

template<typename Type>

Type Pow4 | ( | Type | x | ) |
| inline

Return x4.

## ◆ powLerp()

template<typename T, typename T0>

Mat3< T > powLerp | ( | const Mat3< T0 > & | m1,
|  | const Mat3< T0 > & | m2,
|  | T | t )

Interpolate the rotation between m1 and m2 using Mat::powSolve. Unlike slerp, translation is not treated independently. This results in smoother animation results.

## ◆ powSolve()

template<typename MatType>

void powSolve | ( | const MatType & | aA,
|  | MatType & | aB,
|  | double | aPower,
|  | double | aTol = 0.01 )
| inline

## ◆ PrintCast() [1/3]

template<typename T>

auto PrintCast | ( | const T & | val | ) | -> typename std::enable_if<!std::is_same<T, int8_t>::value && !std::is_same<T, uint8_t>::value, const T&>::type
| inline

8-bit integer values print to std::ostreams as characters. Cast them so that they print as integers instead.

## ◆ PrintCast() [2/3]

int32_t PrintCast | ( | int8_t | val | ) |
| inline

## ◆ PrintCast() [3/3]

uint32_t PrintCast | ( | uint8_t | val | ) |
| inline

## ◆ processTypedMap()

template<typename TransformType, typename OpType>

bool processTypedMap | ( | TransformType & | transform,
|  | OpType & | op )

Utility function that, given a generic map pointer, calls a functor on the fully-resoved map.

Usage:

struct Foo {
template<typename MapT>
void operator()(const MapT& map) const { blah }
};
processTypedMap(myMap, Foo());
openvdb::v12_1::math::processTypedMap
bool processTypedMap(TransformType &transform, OpType &op)
Utility function that, given a generic map pointer, calls a functor on the fully-resoved map.
Definition Transform.h:233

Returns
  `false` if the grid type is unknown or unhandled.

## ◆ Remainder()

template<typename Type>

Type Remainder | ( | Type | x,
|  | Type | y )
| inline

## ◆ rotation() [1/4]

template<class MatType>

MatType rotation | ( | Axis | axis,
|  | typename MatType::value_type | angle )

Return a matrix for rotation by angle radians about the given axis.

Parameters

  axis | The axis (one of X, Y, Z) to rotate about.
  angle | The rotation angle, in radians.

## ◆ rotation() [2/4]

template<class MatType>

MatType rotation | ( | const Quat< typename MatType::value_type > & | q,
|  | typename MatType::value_type | eps = static_cast<typename MatType::value_type>(1.0e-8) )

Return the rotation matrix specified by the given quaternion.

The quaternion is normalized and used to construct the matrix. Note that the matrix is transposed to match post-multiplication semantics.

## ◆ rotation() [3/4]

template<class MatType>

MatType rotation | ( | const Vec3< typename MatType::value_type > & | _axis,
|  | typename MatType::value_type | angle )

Return a matrix for rotation by angle radians about the given axis.

Note
  The axis must be a unit vector.

## ◆ rotation() [4/4]

template<typename MatType, typename ValueType1, typename ValueType2>

MatType rotation | ( | const Vec3< ValueType1 > & | _v1,
|  | const Vec3< ValueType2 > & | _v2,
|  | typename MatType::value_type | eps = static_cast<typename MatType::value_type>(1.0e-8) )
| inline

Return a rotation matrix that maps v1 onto v2 about the cross product of v1 and v2.

## ◆ Round() [1/3]

double Round | ( | double | x | ) |
| inline

## ◆ Round() [2/3]

float Round | ( | float | x | ) |
| inline

Return x rounded to the nearest integer.

## ◆ Round() [3/3]

long double Round | ( | long double | x | ) |
| inline

## ◆ RoundDown() [1/4]

double RoundDown | ( | double | x | ) |
| inline

## ◆ RoundDown() [2/4]

float RoundDown | ( | float | x | ) |
| inline

Return x rounded down to the nearest integer.

## ◆ RoundDown() [3/4]

long double RoundDown | ( | long double | x | ) |
| inline

## ◆ RoundDown() [4/4]

template<typename Type>

Type RoundDown | ( | Type | x,
|  | Type | base )
| inline

Return x rounded down to the nearest multiple of base.

## ◆ RoundUp() [1/4]

double RoundUp | ( | double | x | ) |
| inline

## ◆ RoundUp() [2/4]

float RoundUp | ( | float | x | ) |
| inline

Return x rounded up to the nearest integer.

## ◆ RoundUp() [3/4]

long double RoundUp | ( | long double | x | ) |
| inline

## ◆ RoundUp() [4/4]

template<typename Type>

Type RoundUp | ( | Type | x,
|  | Type | base )
| inline

Return x rounded up to the nearest multiple of base.

## ◆ scale()

template<class MatType>

MatType scale | ( | const Vec3< typename MatType::value_type > & | s | ) |

Return a matrix that scales by s.

## ◆ shear()

template<class MatType>

MatType shear | ( | Axis | axis0,
|  | Axis | axis1,
|  | typename MatType::value_type | shear )

Set the matrix to a shear along axis0 by a fraction of axis1.

Parameters

  axis0 | The fixed axis of the shear.
  axis1 | The shear axis.
  shear | The shear factor.

## ◆ Sign()

template<typename Type>

int Sign | ( | const Type & | x | ) |
| inline

Return the sign of the given value as an integer (either -1, 0 or 1).

## ◆ SignChange()

template<typename Type>

bool SignChange | ( | const Type & | a,
|  | const Type & | b )
| inline

Return `true` if a and b have different signs.

Note
  Zero is considered a positive number.

## ◆ simplify()

OPENVDB_API SharedPtr< MapBase > simplify | ( | SharedPtr< AffineMap > | affine | ) |

reduces an AffineMap to a ScaleMap or a ScaleTranslateMap when it can

## ◆ Sin() [1/2]

double Sin | ( | const double & | x | ) |
| inline

## ◆ Sin() [2/2]

float Sin | ( | const float & | x | ) |
| inline

Return sin x.

## ◆ skew()

template<class MatType>

MatType skew | ( | const Vec3< typename MatType::value_type > & | skew | ) |

Return a matrix as the cross product of the given vector.

## ◆ slerp() [1/2]

template<typename T, typename T0>

Mat3< T > slerp | ( | const Mat3< T0 > & | m1,
|  | const Mat3< T0 > & | m2,
|  | T | t )

Interpolate between m1 and m2. Converts to quaternion form and uses slerp m1 and m2 must be rotation matrices!

## ◆ slerp() [2/2]

template<typename T>

Quat< T > slerp | ( | const Quat< T > & | q1,
|  | const Quat< T > & | q2,
|  | T | t,
|  | T | tolerance = 0.00001 )

Linear interpolation between the two quaternions.

## ◆ SmoothUnitStep() [1/2]

template<typename Type>

Type SmoothUnitStep | ( | Type | x | ) |
| inline

Return 0 if x < 0, 1 if x > 1 or else (3 − 2 x) x².

## ◆ SmoothUnitStep() [2/2]

template<typename Type>

Type SmoothUnitStep | ( | Type | x,
|  | Type | min,
|  | Type | max )
| inline

Return 0 if x < min, 1 if x > max or else (3 − 2 t) t², where t = (x − min)/(max − min).

## ◆ snapMatBasis()

template<class MatType>

MatType snapMatBasis | ( | const MatType & | source,
|  | Axis | axis,
|  | const Vec3< typename MatType::value_type > & | direction )
| inline

This function snaps a specific axis to a specific direction, preserving scaling.

It does this using minimum energy, thus posing a unique solution if basis & direction aren't parallel.

Note
  direction need not be unit.

## ◆ Sqrt() [1/3]

double Sqrt | ( | double | x | ) |
| inline

## ◆ Sqrt() [2/3]

float Sqrt | ( | float | x | ) |
| inline

Return the square root of a floating-point value.

## ◆ Sqrt() [3/3]

long double Sqrt | ( | long double | x | ) |
| inline

## ◆ sqrtSolve()

template<typename MatType>

void sqrtSolve | ( | const MatType & | aA,
|  | MatType & | aB,
|  | double | aTol = 0.01 )
| inline

Solve for A=B*B, given A.

Denman-Beavers square root iteration

## ◆ stringToBiasedGradientScheme()

BiasedGradientScheme stringToBiasedGradientScheme | ( | const std::string & | s | ) |
| inline

## ◆ stringToDScheme()

DScheme stringToDScheme | ( | const std::string & | s | ) |
| inline

## ◆ stringToTemporalIntegrationScheme()

TemporalIntegrationScheme stringToTemporalIntegrationScheme | ( | const std::string & | s | ) |
| inline

## ◆ temporalIntegrationSchemeToMenuName()

std::string temporalIntegrationSchemeToMenuName | ( | TemporalIntegrationScheme | tis | ) |
| inline

## ◆ temporalIntegrationSchemeToString()

std::string temporalIntegrationSchemeToString | ( | TemporalIntegrationScheme | tis | ) |
| inline

## ◆ transformNormal()

template<typename T0, typename T1>

Vec3< T1 > transformNormal | ( | const Mat4< T0 > & | m,
|  | const Vec3< T1 > & | n )

Transform a Vec3 by pre-multiplication, without translation. Presumes this matrix is inverse of coordinate transform Synonymous to "pretransform3x3"

## ◆ Truncate()

template<typename Type>

Type Truncate | ( | Type | x,
|  | unsigned int | digits )
| inline

Return x truncated to the given number of decimal digits.

## ◆ unit() [1/2]

template<class MatType>

MatType unit | ( | const MatType & | in,
|  | typename MatType::value_type | eps,
|  | Vec3< typename MatType::value_type > & | scaling )

Return a copy of the given matrix with its upper 3×3 rows normalized, and return the length of each of these rows in scaling.

This can be geometrically interpretted as a matrix with no scaling along its major axes, and the scaling in the input vector

## ◆ unit() [2/2]

template<class MatType>

MatType unit | ( | const MatType & | mat,
|  | typename MatType::value_type | eps = 1.0e-8 )

Return a copy of the given matrix with its upper 3×3 rows normalized.

This can be geometrically interpreted as a matrix with no scaling along its major axes.

## ◆ WENO5()

template<typename ValueType>

ValueType WENO5 | ( | const ValueType & | v1,
|  | const ValueType & | v2,
|  | const ValueType & | v3,
|  | const ValueType & | v4,
|  | const ValueType & | v5,
|  | float | scale2 = 0.01f )
| inline

Implementation of nominally fifth-order finite-difference WENO.

This function returns the numerical flux. See "High Order Finite Difference and Finite Volume WENO Schemes and Discontinuous Galerkin Methods for CFD" - Chi-Wang Shu ICASE Report No 2001-11 (page 6). Also see ICASE No 97-65 for a more complete reference (Shu, 1997). Given v1 = f(x-2dx), v2 = f(x-dx), v3 = f(x), v4 = f(x+dx) and v5 = f(x+2dx), return an interpolated value f(x+dx/2) with the special property that ( f(x+dx/2) - f(x-dx/2) ) / dx = df/dx (x) + error, where the error is fifth-order in smooth regions: O(dx) <= error <=O(dx^5)

## ◆ ZeroCrossing()

template<typename Type>

bool ZeroCrossing | ( | const Type & | a,
|  | const Type & | b )
| inline

Return `true` if the interval [a, b] includes zero, i.e., if either a or b is zero or if they have different signs.