OpenVDB
0.104.0
|
Namespaces | |
namespace | internal |
Classes | |
class | BBox |
Axis-aligned bounding box. More... | |
class | Coord |
Signed (x, y, z) integer coordinates. More... | |
class | CoordBBox |
Axis-aligned bounding box of signed integer coordinates. More... | |
struct | D1 |
struct | D1< CD_2NDT > |
struct | D1< CD_2ND > |
struct | D1< CD_4TH > |
struct | D1< CD_6TH > |
struct | D1< FD_1ST > |
struct | D1< FD_2ND > |
struct | D1< FD_3RD > |
struct | D1< BD_1ST > |
struct | D1< BD_2ND > |
struct | D1< BD_3RD > |
struct | D1< FD_WENO5 > |
struct | D1< FD_HJWENO5 > |
struct | D1< BD_WENO5 > |
struct | D1< BD_HJWENO5 > |
struct | D1Vec |
struct | D1Vec< CD_2NDT > |
struct | D1Vec< CD_2ND > |
struct | D1Vec< CD_4TH > |
struct | D1Vec< CD_6TH > |
struct | D2 |
struct | D2< CD_SECOND > |
struct | D2< CD_FOURTH > |
struct | D2< CD_SIXTH > |
class | Frustum |
Frustum GeClass. More... | |
class | LegacyFrustum |
LegacyFrustum GeClass used at DreamWorks for converting old vdb files. More... | |
class | Hermite |
Quantized Hermite data object that stores compressed intersection information (offsets and normlas) for the up-wind edges of a voxel. (Size 10 bytes) More... | |
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 | is_linear |
Map traits. More... | |
struct | is_linear< AffineMap > |
struct | is_linear< ScaleMap > |
struct | is_linear< UniformScaleMap > |
struct | is_linear< UnitaryMap > |
struct | is_linear< TranslationMap > |
struct | is_linear< ScaleTranslateMap > |
struct | is_linear< UniformScaleTranslateMap > |
struct | is_linear< CompoundMap< T1, T2 > > |
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_scale |
struct | is_scale< ScaleMap > |
struct | is_scale_translate |
struct | is_scale_translate< ScaleTranslateMap > |
struct | is_uniform_diagonal_jacobian |
struct | is_diagonal_jacobian |
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 | AffineMap |
A general linear transform using homogeneous coordinates to perform rotation, scaling, shear and translation. More... | |
class | ScaleMap |
A specialized Affine transform that scales along the principal axis the scaling need not be uniform in the three-directions. More... | |
class | UniformScaleMap |
A specialized Affine transform that scales along the principal axis the scaling is uniform in the three-directions. More... | |
class | TranslationMap |
A specialized linear transform that performs a translation. 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 | 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 | NonlinearFrustumMap |
This map is composed of three steps. Frist it will take a box of size (Lx X Ly X Lz) defined by an member data bounding box and map it into a frustum with near plane (1 X Ly/Lx) and precribed depth Then this frustum is transformed by an internal second map: most often a uniform scale, but other affects can be achieved by accumulating translation, shear and rotation: these are all applied to the second map. More... | |
class | Mat |
class | Quat |
class | Vec3 |
class | Mat4 |
4x4 -matrix class. More... | |
class | Mat3 |
3x3 matrix class. More... | |
class | Vec4 |
class | RandomInt |
Simple class to generate random intergers. More... | |
struct | promote |
struct | tolerance |
struct | tolerance< float > |
struct | tolerance< double > |
struct | is_vec3d |
simple tool to help determine when type conversions are needed More... | |
struct | is_vec3d< Vec3d > |
struct | is_double |
struct | is_double< double > |
struct | ISGradient |
Gradient operators defined in index space of various orders. More... | |
struct | BIAS_SCHEME |
struct | BIAS_SCHEME< FIRST_BIAS > |
struct | BIAS_SCHEME< SECOND_BIAS > |
struct | BIAS_SCHEME< THIRD_BIAS > |
struct | BIAS_SCHEME< WENO5_BIAS > |
struct | BIAS_SCHEME< HJWENO5_BIAS > |
struct | ISGradientBiased |
Biased Gradient Operators, using upwinding defined by the Vec3Bias input. More... | |
struct | ISGradientNormSqrd |
struct | ISLaplacian |
Laplacian defined in index space, using various ceneter-differnce stencils. More... | |
struct | ISLaplacian< CD_SECOND > |
struct | ISLaplacian< CD_FOURTH > |
struct | ISLaplacian< CD_SIXTH > |
struct | ISDivergence |
Divergence operator defined in index space using various first derivative schemes. More... | |
struct | ISCurl |
Curl operator defined in index space using various first derivative schemes. More... | |
struct | ISMeanCurvature |
Compute the mean curvature in index space. More... | |
struct | Gradient |
Center difference gradient opperators, defined with respect to the range-space of the map . More... | |
struct | Gradient< TranslationMap, DiffScheme > |
struct | Gradient< UniformScaleMap, CD_2ND > |
struct | Gradient< UniformScaleTranslateMap, CD_2ND > |
struct | Gradient< ScaleMap, CD_2ND > |
struct | Gradient< ScaleTranslateMap, CD_2ND > |
struct | GradientBiased |
Biased gradient opperators, defined with respect to the range-space of the map note this will need to be divided by two in the case of CD_2NDT. More... | |
struct | GradientNormSqrd |
struct | GradientNormSqrd< UniformScaleMap, GradScheme > |
struct | GradientNormSqrd< UniformScaleTranslateMap, GradScheme > |
struct | Divergence |
Compute the Divergence of a vector-type grid using differnce of various orders, the reulst defined with respect to the range-space of the map . More... | |
struct | Divergence< TranslationMap, DiffScheme > |
struct | Divergence< UniformScaleMap, DiffScheme > |
struct | Divergence< UniformScaleTranslateMap, DiffScheme > |
struct | Divergence< UniformScaleMap, CD_2ND > |
struct | Divergence< UniformScaleTranslateMap, CD_2ND > |
struct | Divergence< ScaleMap, DiffScheme > |
struct | Divergence< ScaleTranslateMap, DiffScheme > |
struct | Divergence< ScaleMap, CD_2ND > |
struct | Divergence< ScaleTranslateMap, CD_2ND > |
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, DiffScheme > |
struct | Curl< UniformScaleTranslateMap, DiffScheme > |
struct | Curl< UniformScaleMap, CD_2ND > |
struct | Curl< UniformScaleTranslateMap, CD_2ND > |
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< TranslationMap, DiffScheme > |
struct | Laplacian< UnitaryMap, DiffScheme > |
struct | Laplacian< UniformScaleMap, DiffScheme > |
struct | Laplacian< UniformScaleTranslateMap, DiffScheme > |
struct | Laplacian< ScaleMap, DiffScheme > |
struct | Laplacian< ScaleTranslateMap, DiffScheme > |
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 | MeanCurvature |
Compute the Mean Curvature. More... | |
struct | MeanCurvature< TranslationMap, DiffScheme2, DiffScheme1 > |
struct | MeanCurvature< UniformScaleMap, DiffScheme2, DiffScheme1 > |
struct | MeanCurvature< UniformScaleTranslateMap, DiffScheme2, DiffScheme1 > |
class | GenericMap |
A wrapper that holds a MapBase::ConstPtr and exposes a reduced set of fucntionality needed by the mathematical operators. This may be used in some Map-templated code, when the over-head of actually resovling the Map type is large compared to the map work to be done. More... | |
class | Plane |
Plane Class. More... | |
class | QuantizedUnitVec |
class | Ray |
class | RayInterval |
class | RayIntervalSet |
class | BaseStencil |
class | SevenPointStencil |
class | SecondOrderDenseStencil |
class | ThirteenPointStencil |
class | FourthOrderDenseStencil |
class | NineteenPointStencil |
class | SixthOrderDenseStencil |
class | GradStencil |
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... | |
class | CurvatureStencil |
class | DenseStencil |
Dense stencil of a given width. More... | |
class | Transform |
Calculate an axis-aligned bounding box in index space from a bounding sphere in world space. More... | |
class | Tuple |
struct | TupleAbs |
Helper class to compute the absolute value of a Tuple. More... | |
struct | TupleAbs< SIZE, T, true > |
class | Mat2 |
class | Vec2 |
Typedefs | |
typedef CompoundMap < UnitaryMap, TranslationMap > | UnitaryAndTranslationMap |
typedef CompoundMap < CompoundMap< UnitaryMap, ScaleMap >, UnitaryMap > | SpectralDecomposedMap |
typedef SpectralDecomposedMap | SymmetricMap |
typedef CompoundMap < SymmetricMap, UnitaryAndTranslationMap > | FullyDecomposedMap |
typedef CompoundMap < SymmetricMap, UnitaryMap > | PolarDecomposedMap |
typedef Mat3< float > | Mat3s |
typedef Mat3< double > | Mat3d |
typedef Mat3s | Mat3f |
typedef Mat4< float > | Mat4s |
typedef Mat4< double > | Mat4d |
typedef Mat4s | Mat4f |
typedef Quat< float > | Quats |
typedef Quat< double > | Quatd |
typedef Vec2< float > | Vec2s |
typedef Vec2< int > | Vec2i |
typedef Vec2< unsigned int > | Vec2ui |
typedef Vec2< double > | Vec2d |
typedef Vec2s | Vec2f |
typedef Vec3< int > | Vec3i |
typedef Vec3< unsigned int > | Vec3ui |
typedef Vec3< float > | Vec3s |
typedef Vec3< double > | Vec3d |
typedef Vec3s | Vec3f |
typedef Vec4< int > | Vec4i |
typedef Vec4< unsigned int > | Vec4ui |
typedef Vec4< float > | Vec4s |
typedef Vec4< double > | Vec4d |
typedef Vec4s | Vec4f |
Functions | |
template<class VectorType > | |
std::ostream & | operator<< (std::ostream &os, const BBox< VectorType > &b) |
std::ostream & | operator<< (std::ostream &os, const Coord &xyz) |
std::ostream & | operator<< (std::ostream &os, const CoordBBox &b) |
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.01) |
implimentation of nonimally fith-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), v5 = f(x+2dx), the returns and 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 5-order in smooth regions: O(dx) <= error <=O(dx^5) More... | |
template<typename Real > | |
Real | GudonovsNormSqrd (bool isOutside, Real dP_xm, Real dP_xp, Real dP_ym, Real dP_yp, Real dP_zm, Real dP_zp) |
template<typename Real > | |
Real | GudonovsNormSqrd (bool isOutside, const Vec3< Real > &gradient_m, const Vec3< Real > &gradient_p) |
template<typename Real > | |
std::ostream & | operator<< (std::ostream &os, const Frustum< Real > &f) |
std::ostream & | operator<< (std::ostream &ostr, const Hermite &rhs) |
bool | isApproxEqual (const Hermite &lhs, const Hermite &rhs) |
bool | isApproxEqual (const Hermite &lhs, const Hermite &rhs, const Hermite &) |
SymmetricMap::Ptr | createSymmetricMap (const Mat3d &m) |
Utility methods. More... | |
PolarDecomposedMap::Ptr | createPolarDecomposedMap (const Mat3d &m) |
Decomposes a general linear into translation following polar decomposition. More... | |
FullyDecomposedMap::Ptr | createFullyDecomposedMap (const Mat4d &m) |
General decomposition of a Matrix into a Unitary (e.g. rotation) following a Symmetric (e.g. stretch & shear) More... | |
MapBase::Ptr | simplify (AffineMap::Ptr affine) |
boost::shared_ptr< MapBase > | simplify (boost::shared_ptr< AffineMap > affine) |
reduces an AffineMap to a ScaleMap or a ScaleTranslateMap when it can More... | |
template<class MatType > | |
MatType | rotation (const Quat< typename MatType::value_type > &q, typename MatType::value_type eps=1.0e-8) |
template<class MatType > | |
MatType | rotation (Axis axis, typename MatType::value_type angle) |
Set the matrix to a rotation about the given axis. More... | |
template<class MatType > | |
MatType | rotation (const Vec3< typename MatType::value_type > &_axis, typename MatType::value_type angle) |
template<class MatType > | |
Vec3< typename MatType::value_type > | eulerAngles (const MatType &mat, RotationOrder rotationOrder, typename MatType::value_type eps=1.0e-8) |
template<class MatType > | |
MatType | rotation (const Vec3< typename MatType::value_type > &_v1, const Vec3< typename MatType::value_type > &_v2, typename MatType::value_type eps=1.0e-8) |
Set the matrix to a rotation that maps v1 onto v2 about the cross product of v1 and v2. More... | |
template<class MatType > | |
MatType | scale (const Vec3< typename MatType::value_type > &scaling) |
template<class MatType > | |
Vec3< typename MatType::value_type > | getScale (const MatType &mat) |
template<class MatType > | |
MatType | unit (const MatType &mat, typename MatType::value_type eps=1.0e-8) |
template<class MatType > | |
MatType | unit (const MatType &in, typename MatType::value_type eps, Vec3< typename MatType::value_type > &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. More... | |
template<class MatType > | |
MatType | skew (const Vec3< typename MatType::value_type > &skew) |
template<class MatType > | |
MatType | aim (const Vec3< typename MatType::value_type > &direction, const Vec3< typename MatType::value_type > &vertical) |
template<class MatType > | |
static MatType & | padMat4 (MatType &dest) |
template<typename MatType > | |
void | sqrtSolve (const MatType &aA, MatType &aB, double aTol=0.01) |
template<typename MatType > | |
void | powSolve (const MatType &aA, MatType &aB, double aPower, double aTol=0.01) |
template<typename MatType > | |
bool | isIdentity (const MatType &m) |
template<typename MatType > | |
bool | isInvertible (const MatType &m) |
template<typename MatType > | |
bool | isSymmetric (const MatType &m) |
template<typename MatType > | |
bool | isUnitary (const MatType &m) |
Determine is a matrix is Unitary (i.e. rotation or reflection) More... | |
template<typename MatType > | |
bool | isDiagonal (const MatType &mat) |
Determine if a matrix is diagonal. More... | |
template<typename MatType > | |
MatType::ValueType | lInfinityNorm (const MatType &matrix) |
takes a n by n matrix and returns the L_Infinty norm More... | |
template<typename MatType > | |
MatType::ValueType | lOneNorm (const MatType &matrix) |
takes an n by n matrix and returns the L_1 norm More... | |
template<typename MatType > | |
bool | polarDecomposition (const MatType &input, MatType &unitary, MatType &positive_hermitian, unsigned int MAX_ITERATIONS=100) |
Decompose an invertible 3x3 matrix into Unitary following a symmetric matrix (postitive semi-defininte Hermitian): i.e. M = U * S if the Unitary.det() = 1 it is a rotation, otherwise Unitary.det() = -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. More... | |
template<typename T0 , typename T1 > | |
Mat3< typename promote< T0, T1 > ::type > | operator* (const Mat3< T0 > &m0, const Mat3< T1 > &m1) |
Matrix multiplication. More... | |
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) 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. More... | |
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) |
void | randSeed (unsigned int seed) |
==========> Random Values <================== More... | |
double | randUniform () |
Return random value [0,1]. More... | |
template<typename Type > | |
Type | Clamp (Type x, Type min, Type max) |
Return x clamped to [min, max]. More... | |
template<class Type > | |
Type | Clamp01 (Type x) |
Return x clamped to [0, 1]. More... | |
template<class Type > | |
bool | ClampTest01 (Type &x) |
Return true if x is outside [0,1]. More... | |
template<class Type > | |
Type | SmoothUnitStep (Type x, Type min, Type max) |
Return 0 if x<min, 1 if x>max and else (3-2*t)*t*t, (x-min)/(max-min) More... | |
int32_t | Abs (int32_t i) |
Return the absolute value of a signed integer. More... | |
int64_t | Abs (int64_t i) |
Return the absolute value of a signed long integer. More... | |
float | Abs (float x) |
Return the absolute value of a float. More... | |
double | Abs (double x) |
Return the absolute value of a double. More... | |
long double | Abs (long double x) |
Return the absolute value of a long double. More... | |
uint32_t | Abs (uint32_t i) |
Return the absolute value of a unsigned integer. More... | |
uint64_t | Abs (uint64_t i) |
Return the absolute value of a unsigned integer. More... | |
template<typename Type > | |
bool | isZero (const Type &x) |
template<typename Type > | |
bool | isApproxEqual (const Type &a, const Type &b) |
template<typename Type > | |
bool | isApproxEqual (const Type &a, const Type &b, const Type &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 T0 , typename T1 > | |
bool | isExactlyEqual (const T0 &a, const T1 &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 aFloatValue) |
int64_t | doubleToInt64 (const double aDoubleValue) |
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 x to the power of two, i.e. x*x. More... | |
template<typename Type > | |
Type | Pow3 (Type x) |
Return x to the power of three, i.e. x*x*x. More... | |
template<typename Type > | |
Type | Pow4 (Type x) |
Return x to the power of four, i.e. x*x*x*x. More... | |
template<typename Type > | |
Type | Pow (Type x, int n) |
Return x to the power of n, i.e. x^n. More... | |
float | Pow (float b, float e) |
Return b to the power of e, i.e. b^e. More... | |
double | Pow (double b, double e) |
Return b to the power of e, i.e. b^e. More... | |
template<typename Type > | |
const Type & | Max (const Type &a, const Type &b) |
Return the maximum of two values. More... | |
template<typename Type > | |
const Type & | Max (const Type &a, const Type &b, const Type &c) |
Return the maximum of three values. More... | |
template<typename Type > | |
const Type & | Max (const Type &a, const Type &b, const Type &c, const Type &d) |
Return the maximum of four values. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
template<typename Type > | |
const Type & | Min (const Type &a, const Type &b) |
Return the minimum of two values. More... | |
template<typename Type > | |
const Type & | Min (const Type &a, const Type &b, const Type &c) |
Return the minimum of three values. More... | |
template<typename Type > | |
const Type & | Min (const Type &a, const Type &b, const Type &c, const Type &d) |
Return the minimum of four values. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
template<typename Type > | |
int | Sign (const Type &x) |
Return the sign of a variable as an integer. The three cases are -1, 0 or 1. More... | |
float | Sqrt (float x) |
Return square-root of a floating point. More... | |
double | Sqrt (double x) |
long double | Sqrt (long double x) |
int | Mod (int i, int j) |
Return remainder of x/y = Mod. More... | |
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 | Reminder (Type x, Type y) |
Return reminder of x/y. More... | |
float | RoundUp (float x) |
Return round up to nearest integer or base. More... | |
double | RoundUp (double x) |
long double | RoundUp (long double x) |
template<typename Type > | |
Type | RoundUp (Type x, Type base) |
float | RoundDown (float x) |
Return rounds down to nearest integer or base. More... | |
double | RoundDown (double x) |
long double | RoundDown (long double x) |
template<typename Type > | |
Type | RoundDown (Type x, Type base) |
template<typename Type > | |
Type | IntegerPart (Type x) |
Return integer part. More... | |
template<typename Type > | |
Type | FractionalPart (Type x) |
Return fractional part. More... | |
int | Floor (float x) |
Return floor. More... | |
int | Floor (double x) |
int | Floor (long double x) |
int | Ceil (float x) |
Return ceil. More... | |
int | Ceil (double x) |
int | Ceil (long double x) |
template<typename Type > | |
Type | Round (Type x) |
Return rounds off x to nearest integer value. More... | |
template<typename Type > | |
Type | Chop (Type x, Type delta) |
Return chop of x. More... | |
template<typename Type > | |
Type | Truncate (Type x, unsigned int digits) |
Return truncation of x to smoe digits. More... | |
template<typename Type > | |
Type | Inv (Type x) |
Return inverse of x. More... | |
template<typename Real > | |
std::ostream & | operator<< (std::ostream &os, const Plane< Real > &p) |
Simple output streaming of a Plane. Writes normal and position. More... | |
double | sLineSeg3ToPointDistSqr (const Vec3d &p0, const Vec3d &p1, const Vec3d &point, double &t, double epsilon=1e-10) |
Squared distance of a line segment p(t) = (1-t)*p0 + t*p1 to point. More... | |
double | sTri3ToPointDistSqr (const Vec3d &v0, const Vec3d &v1, const Vec3d &v2, const Vec3d &point, Vec2d &uv, double epsilon=1e-10) |
Slightly modified version of the algorithm described in "Geometric Tools for
Computer Graphics" pg 376 to 382 by Schneider and Eberly. Extended to handle the case of a degenerate triangle. Also returns barycentric rather than (s,t) coordinates. More... | |
static double | triToPtnDistSqr (const Vec3d &v0, const Vec3d &v1, const Vec3d &v2, const Vec3d &point) |
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. More... | |
template<typename S , typename T > | |
Quat< T > | operator* (S scalar, const Quat< T > &q) |
Returns V, where ![]() ![]() | |
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! More... | |
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 Real > | |
std::ostream & | operator<< (std::ostream &os, const Ray< Real > &r) |
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. More... | |
std::ostream & | operator<< (std::ostream &os, const Transform &t) |
template<typename ResolvedMapType , typename OpType > | |
void | doProcessTypedMap (Transform &transform, OpType &op) |
Helper function used internally by processTypedMap() More... | |
template<typename ResolvedMapType , typename OpType > | |
void | doProcessTypedMap (const Transform &transform, OpType &op) |
Helper function used internally by processTypedMap() More... | |
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. More... | |
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 > | |
std::ostream & | operator<< (std::ostream &ostr, const Tuple< SIZE, T > &classname) |
Write a Tuple to an output stream. More... | |
template<typename S , typename T > | |
Vec2< typename promote< S, T > ::type > | operator* (S scalar, const Vec2< T > &v) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec2< typename promote< S, T > ::type > | operator* (const Vec2< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec2< typename promote< T0, T1 > ::type > | operator* (const Vec2< T0 > &v0, const Vec2< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec2< typename promote< S, T > ::type > | operator/ (S scalar, const Vec2< T > &v) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec2< typename promote< S, T > ::type > | operator/ (const Vec2< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec2< typename promote< T0, T1 > ::type > | operator/ (const Vec2< T0 > &v0, const Vec2< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec2< typename promote< T0, T1 > ::type > | operator+ (const Vec2< T0 > &v0, const Vec2< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec2< typename promote< S, T > ::type > | operator+ (const Vec2< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec2< typename promote< T0, T1 > ::type > | operator- (const Vec2< T0 > &v0, const Vec2< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec2< typename promote< S, T > ::type > | operator- (const Vec2< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
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 > | |
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. More... | |
template<typename T > | |
Vec2< T > | maxComponent (const Vec2< T > &v1, const Vec2< T > &v2) |
Return component-wise maximum of the two vectors. More... | |
template<typename T0 , typename T1 > | |
bool | operator== (const Vec3< T0 > &v0, const Vec3< T1 > &v1) |
Equality operator, does exact floating point comparisons. More... | |
template<typename T0 , typename T1 > | |
bool | operator!= (const Vec3< T0 > &v0, const Vec3< T1 > &v1) |
Inequality operator, does exact floating point comparisons. More... | |
template<typename S , typename T > | |
Vec3< typename promote< S, T > ::type > | operator* (S scalar, const Vec3< T > &v) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec3< typename promote< S, T > ::type > | operator* (const Vec3< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec3< typename promote< T0, T1 > ::type > | operator* (const Vec3< T0 > &v0, const Vec3< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec3< typename promote< S, T > ::type > | operator/ (S scalar, const Vec3< T > &v) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec3< typename promote< S, T > ::type > | operator/ (const Vec3< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec3< typename promote< T0, T1 > ::type > | operator/ (const Vec3< T0 > &v0, const Vec3< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec3< typename promote< T0, T1 > ::type > | operator+ (const Vec3< T0 > &v0, const Vec3< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec3< typename promote< S, T > ::type > | operator+ (const Vec3< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec3< typename promote< T0, T1 > ::type > | operator- (const Vec3< T0 > &v0, const Vec3< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec3< typename promote< S, T > ::type > | operator- (const Vec3< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
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 > | |
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. More... | |
template<typename T > | |
Vec3< T > | maxComponent (const Vec3< T > &v1, const Vec3< T > &v2) |
Return component-wise maximum of the two vectors. More... | |
template<typename T0 , typename T1 > | |
bool | operator== (const Vec4< T0 > &v0, const Vec4< T1 > &v1) |
Equality operator, does exact floating point comparisons. More... | |
template<typename T0 , typename T1 > | |
bool | operator!= (const Vec4< T0 > &v0, const Vec4< T1 > &v1) |
Inequality operator, does exact floating point comparisons. More... | |
template<typename S , typename T > | |
Vec4< typename promote< S, T > ::type > | operator* (S scalar, const Vec4< T > &v) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec4< typename promote< S, T > ::type > | operator* (const Vec4< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec4< typename promote< T0, T1 > ::type > | operator* (const Vec4< T0 > &v0, const Vec4< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec4< typename promote< S, T > ::type > | operator/ (S scalar, const Vec4< T > &v) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec4< typename promote< S, T > ::type > | operator/ (const Vec4< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec4< typename promote< T0, T1 > ::type > | operator/ (const Vec4< T0 > &v0, const Vec4< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec4< typename promote< T0, T1 > ::type > | operator+ (const Vec4< T0 > &v0, const Vec4< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec4< typename promote< S, T > ::type > | operator+ (const Vec4< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T0 , typename T1 > | |
Vec4< typename promote< T0, T1 > ::type > | operator- (const Vec4< T0 > &v0, const Vec4< T1 > &v1) |
Returns V, where ![]() ![]() | |
template<typename S , typename T > | |
Vec4< typename promote< S, T > ::type > | operator- (const Vec4< T > &v, S scalar) |
Returns V, where ![]() ![]() | |
template<typename T > | |
Vec4< T > | minComponent (const Vec4< T > &v1, const Vec4< T > &v2) |
Return component-wise minimum of the two vectors. More... | |
template<typename T > | |
Vec4< T > | maxComponent (const Vec4< T > &v1, const Vec4< T > &v2) |
Return component-wise maximum of the two vectors. More... | |
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. More... | |
template<typename T > | |
Vec3< typename promote< T, typename Coord::ValueType > ::type > | operator+ (const Coord &v1, const Vec3< T > &v0) |
Allow a Coord to be added to or subtracted from a Vec3. More... | |
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. More... | |
template<typename T > | |
Vec3< typename promote< T, Coord::ValueType >::type > | operator- (const Coord &v1, const Vec3< T > &v0) |
Allow a Coord to be subtracted from a Vec3. More... | |
Hermite | min (const Hermite &, const Hermite &) |
min and max operations done directly on the compressed data. More... | |
Hermite | max (const Hermite &lhs, const Hermite &rhs) |
min and max operations done directly on the compressed data. More... | |
Variables | |
tbb::mutex | sInitMapRegistryMutex |
tbb::mutex | sInitMutex |
typedef CompoundMap<SymmetricMap, UnitaryMap> PolarDecomposedMap |
typedef SpectralDecomposedMap SymmetricMap |
enum Axis |
enum BiasedGradientScheme |
enum DDScheme |
enum DScheme |
enum RotationOrder |
|
inline |
Return the absolute value of a signed integer.
|
inline |
Return the absolute value of a signed long integer.
|
inline |
Return the absolute value of a float.
|
inline |
Return the absolute value of a double.
|
inline |
Return the absolute value of a long double.
|
inline |
Return the absolute value of a unsigned integer.
Tuple<SIZE, T> openvdb::v0_104_0::math::Abs | ( | const Tuple< SIZE, T > & | t | ) |
|
inline |
Return the absolute value of a unsigned integer.
MatType openvdb::v0_104_0::math::aim | ( | const Vec3< typename MatType::value_type > & | direction, |
const Vec3< typename MatType::value_type > & | vertical | ||
) |
Build an orientation matrix such that z points along direction, and y is along direction/vertical plane.
|
inline |
Angle between two vectors, the result is between [0, pi], e.g. float a = Vec2f::angle(v1,v2);
|
inline |
Angle between two vectors, the result is between [0, pi], e.g. double a = Vec3d::angle(v1,v2);
Mat3<T> openvdb::v0_104_0::math::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!
|
inline |
|
inline |
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.
|
inline |
Return ceil.
|
inline |
|
inline |
|
inline |
Return chop of x.
|
inline |
Return x clamped to [min, max].
|
inline |
Return x clamped to [0, 1].
|
inline |
Return true
if x is outside [0,1].
boost::shared_ptr< FullyDecomposedMap > createFullyDecomposedMap | ( | const Mat4d & | m | ) |
General decomposition of a Matrix into a Unitary (e.g. rotation) following a Symmetric (e.g. stretch & shear)
boost::shared_ptr< 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
boost::shared_ptr< SymmetricMap > createSymmetricMap | ( | const Mat3d & | m | ) |
Utility methods.
Create a SymmetricMap from a symmetric matrix. Decomposes the map into Rotation Diagonal Rotation^T
bool openvdb::v0_104_0::math::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) 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.
|
inline |
Helper function used internally by processTypedMap()
|
inline |
Helper function used internally by processTypedMap()
|
inline |
|
inline |
|
inline |
Vec3<typename MatType::value_type> openvdb::v0_104_0::math::eulerAngles | ( | const MatType & | mat, |
RotationOrder | rotationOrder, | ||
typename MatType::value_type | eps = 1.0e-8 |
||
) |
Return the euler angles composing this 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;
|
inline |
|
inline |
Return floor.
|
inline |
|
inline |
|
inline |
Return fractional part.
Vec3<typename MatType::value_type> openvdb::v0_104_0::math::getScale | ( | const MatType & | mat | ) |
|
inline |
|
inline |
|
inline |
|
inline |
Return integer part.
|
inline |
Return inverse of x.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Determine if a matrix is diagonal.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Determine if a matrix is symmetric. This implicitly uses "isApproxEqual" to determine the equality
|
inline |
|
inline |
|
inline |
Determine is a matrix is Unitary (i.e. rotation or reflection)
|
inline |
MatType::ValueType openvdb::v0_104_0::math::lInfinityNorm | ( | const MatType & | matrix | ) |
takes a n by n matrix and returns the L_Infinty norm
MatType::ValueType openvdb::v0_104_0::math::lOneNorm | ( | const MatType & | matrix | ) |
takes an n by n matrix and returns the L_1 norm
Hermite max | ( | const Hermite & | lhs, |
const Hermite & | rhs | ||
) |
min and max operations done directly on the compressed data.
|
inline |
Return the maximum of two values.
|
inline |
Return the maximum of three values.
|
inline |
Return the maximum of four values.
|
inline |
Return the maximum of five values.
|
inline |
Return the maximum of six values.
|
inline |
Return the maximum of seven values.
|
inline |
Return the maximum of eight values.
|
inline |
Return component-wise maximum of the two vectors.
|
inline |
Return component-wise maximum of the two vectors.
|
inline |
Return component-wise maximum of the two vectors.
Hermite min | ( | const Hermite & | lhs, |
const Hermite & | rhs | ||
) |
min and max operations done directly on the compressed data.
|
inline |
Return the minimum of two values.
|
inline |
Return the minimum of three values.
|
inline |
Return the minimum of four values.
|
inline |
Return the minimum of five values.
|
inline |
Return the minimum of six values.
|
inline |
Return the minimum of seven values.
|
inline |
Return the minimum of eight values.
|
inline |
Return component-wise minimum of the two vectors.
|
inline |
Return component-wise minimum of the two vectors.
|
inline |
Return component-wise minimum of the two vectors.
|
inline |
Return remainder of x/y = Mod.
|
inline |
|
inline |
|
inline |
|
inline |
Inequality operator, does exact floating point comparisons.
|
inline |
Inequality operator, does exact floating point comparisons.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
Quat<T> openvdb::v0_104_0::math::operator* | ( | S | scalar, |
const Quat< T > & | q | ||
) |
Returns V, where for
.
Mat3<typename promote<T0, T1>::type> openvdb::v0_104_0::math::operator* | ( | const Mat3< T0 > & | m0, |
const Mat3< T1 > & | m1 | ||
) |
Matrix multiplication.
Returns M, where for
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
|
inline |
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
|
inline |
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
|
inline |
Returns V, where for
.
bool openvdb::v0_104_0::math::operator< | ( | const Tuple< SIZE, T0 > & | t0, |
const Tuple< SIZE, T1 > & | t1 | ||
) |
|
inline |
|
inline |
std::ostream& openvdb::v0_104_0::math::operator<< | ( | std::ostream & | ostr, |
const Tuple< SIZE, T > & | classname | ||
) |
Write a Tuple to an output stream.
|
inline |
Simple output streaming of a Plane. Writes normal and position.
|
inline |
std::ostream & operator<< | ( | std::ostream & | os, |
const Transform & | t | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
Equality operator, does exact floating point comparisons.
|
inline |
Equality operator, does exact floating point comparisons.
bool openvdb::v0_104_0::math::operator> | ( | const Tuple< SIZE, T0 > & | t0, |
const Tuple< SIZE, T1 > & | t1 | ||
) |
|
inline |
Orthonormalize vectors v1 and v2 and store back the resulting basis e.g. Vec2f::orthonormalize(v1,v2);
|
inline |
Orthonormalize vectors v1, v2 and v3 and store back the resulting basis e.g. Vec3d::orthonormalize(v1,v2,v3);
Mat3<T> openvdb::v0_104_0::math::outerProduct | ( | const Vec3< T > & | v1, |
const Vec3< T > & | v2 | ||
) |
this = outer product of v1, v2 e.g. M = Mat3f::outerproduct(v1,v2);
|
static |
Write 0's along Mat4's last row and column, and a 1 on its diagonal Useful initialization when we're initializing juse the 3x3 block
bool openvdb::v0_104_0::math::polarDecomposition | ( | const MatType & | input, |
MatType & | unitary, | ||
MatType & | positive_hermitian, | ||
unsigned int | MAX_ITERATIONS = 100 |
||
) |
Decompose an invertible 3x3 matrix into Unitary following a symmetric matrix (postitive semi-defininte Hermitian): i.e. M = U * S if the Unitary.det() = 1 it is a rotation, otherwise Unitary.det() = -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.
Type openvdb::v0_104_0::math::Pow | ( | Type | x, |
int | n | ||
) |
Return x to the power of n, i.e. x^n.
|
inline |
Return b to the power of e, i.e. b^e.
|
inline |
Return b to the power of e, i.e. b^e.
|
inline |
Return x to the power of two, i.e. x*x.
|
inline |
Return x to the power of three, i.e. x*x*x.
|
inline |
Return x to the power of four, i.e. x*x*x*x.
Mat3<T> openvdb::v0_104_0::math::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.
|
inline |
bool openvdb::v0_104_0::math::processTypedMap | ( | TransformType & | transform, |
OpType & | op | ||
) |
Utility function that, given a generic map pointer, calls a functor on the fully-resoved map.
Usage:
false
if the grid type is unknown or unhandled.
|
inline |
==========> Random Values <==================
Initialize random number generator
|
inline |
Return random value [0,1].
|
inline |
Return reminder of x/y.
MatType openvdb::v0_104_0::math::rotation | ( | const Quat< typename MatType::value_type > & | q, |
typename MatType::value_type | eps = 1.0e-8 |
||
) |
Returns rotation matrix specified by the quaternion The quaternion is normalized and used to construct the matrix Note that the matrix is transposed to match post-multiplication symantics.
MatType openvdb::v0_104_0::math::rotation | ( | Axis | axis, |
typename MatType::value_type | angle | ||
) |
Set the matrix to a rotation about the given axis.
axis | The axis (one of X, Y, Z) to rotate about. |
angle | The rotation angle, in radians. |
MatType openvdb::v0_104_0::math::rotation | ( | const Vec3< typename MatType::value_type > & | _axis, |
typename MatType::value_type | angle | ||
) |
MatType openvdb::v0_104_0::math::rotation | ( | const Vec3< typename MatType::value_type > & | _v1, |
const Vec3< typename MatType::value_type > & | _v2, | ||
typename MatType::value_type | eps = 1.0e-8 |
||
) |
Set the matrix to a rotation that maps v1 onto v2 about the cross product of v1 and v2.
|
inline |
Return rounds off x to nearest integer value.
|
inline |
Return rounds down to nearest integer or base.
|
inline |
|
inline |
|
inline |
|
inline |
Return round up to nearest integer or base.
|
inline |
|
inline |
|
inline |
MatType openvdb::v0_104_0::math::scale | ( | const Vec3< typename MatType::value_type > & | scaling | ) |
MatType openvdb::v0_104_0::math::shear | ( | Axis | axis0, |
Axis | axis1, | ||
typename MatType::value_type | shear | ||
) |
Set the matrix to a shear along axis0 by a fraction of axis1.
axis0 | The fixed axis of the shear. |
axis1 | The shear axis. |
shear | The shear factor. |
|
inline |
Return the sign of a variable as an integer. The three cases are -1, 0 or 1.
boost::shared_ptr<MapBase> openvdb::v0_104_0::math::simplify | ( | boost::shared_ptr< AffineMap > | affine | ) |
reduces an AffineMap to a ScaleMap or a ScaleTranslateMap when it can
MapBase::Ptr openvdb::v0_104_0::math::simplify | ( | AffineMap::Ptr | affine | ) |
MatType openvdb::v0_104_0::math::skew | ( | const Vec3< typename MatType::value_type > & | skew | ) |
Quat<T> openvdb::v0_104_0::math::slerp | ( | const Quat< T > & | q1, |
const Quat< T > & | q2, | ||
T | t, | ||
T | tolerance = 0.00001 |
||
) |
Linear interpolation between the two quaternions.
Mat3<T> openvdb::v0_104_0::math::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!
double sLineSeg3ToPointDistSqr | ( | const Vec3d & | p0, |
const Vec3d & | p1, | ||
const Vec3d & | point, | ||
double & | t, | ||
double | epsilon = 1e-10 |
||
) |
Squared distance of a line segment p(t) = (1-t)*p0 + t*p1 to point.
|
inline |
Return 0 if x<min, 1 if x>max and else (3-2*t)*t*t, (x-min)/(max-min)
|
inline |
Return square-root of a floating point.
|
inline |
|
inline |
|
inline |
Solve for A=B*B, given A
Denman-Beavers square root iteration
double sTri3ToPointDistSqr | ( | const Vec3d & | v0, |
const Vec3d & | v1, | ||
const Vec3d & | v2, | ||
const Vec3d & | point, | ||
Vec2d & | uv, | ||
double | epsilon = 1e-10 |
||
) |
Slightly modified version of the algorithm described in "Geometric Tools for Computer Graphics" pg 376 to 382 by Schneider and Eberly. Extended to handle the case of a degenerate triangle. Also returns barycentric rather than (s,t) coordinates.
Basic Idea (See book for details):
Write the equation of the line as
T(s,t) = v0 + s*(v1-v0) + t*(v2-v0)
Minimize the quadratic function
|| T(s,t) - point || ^2
by solving for when the gradient is 0. This can be done without any square roots.
If the resulting solution satisfies 0 <= s + t <= 1, then the solution lies on the interior of the triangle, and we are done (region 0). If it does not then the closest solution lies on a boundary and we have to solve for it by solving a 1D problem where we use one variable as free say "s" and set the other variable t = (1-s)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Vec3<T1> openvdb::v0_104_0::math::transformNormal | ( | const Mat4< T0 > & | m, |
const Vec3< T1 > & | n | ||
) |
|
inlinestatic |
|
inline |
Return truncation of x to smoe digits.
MatType openvdb::v0_104_0::math::unit | ( | const MatType & | mat, |
typename MatType::value_type | eps = 1.0e-8 |
||
) |
MatType openvdb::v0_104_0::math::unit | ( | const MatType & | in, |
typename MatType::value_type | eps, | ||
Vec3< typename MatType::value_type > & | scaling | ||
) |
|
inline |
implimentation of nonimally fith-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), v5 = f(x+2dx), the returns and 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 5-order in smooth regions: O(dx) <= error <=O(dx^5)
tbb::mutex sInitMapRegistryMutex |
tbb::mutex sInitMutex |