22 double* value,
double* weight,
32 (*value) = fssr_basis<double>(sample.
scale, tpos, value_deriv);
33 (*weight) = fssr_weight<double>(sample.
scale, tpos, weight_deriv);
35 if (value_deriv ==
nullptr && weight_deriv ==
nullptr)
40 if (value_deriv !=
nullptr)
41 *value_deriv = irot.
mult(*value_deriv);
42 if (weight_deriv !=
nullptr)
43 *weight_deriv = irot.
mult(*weight_deriv);
63 (*rot)[0] = -1.0f; (*rot)[1] = 0.0f; (*rot)[2] = 0.0f;
64 (*rot)[3] = 0.0f; (*rot)[4] = -1.0f; (*rot)[5] = 0.0f;
65 (*rot)[6] = 0.0f; (*rot)[7] = 0.0f; (*rot)[8] = 1.0f;
84 (*rot)[0] = normal[0];
85 (*rot)[1] = normal[1];
86 (*rot)[2] = -normal[1];
87 (*rot)[3] = normal[0];
Matrix class for arbitrary dimensions and types.
Matrix< T, N, U > mult(Matrix< T, M, U > const &rhs) const
Matrix with matrix multiplication.
Matrix< T, M, N > transposed(void) const
Returns a transposed copy of self by treating rows as columns.
Vector class for arbitrary dimensions and types.
Vector< T, N > cross(Vector< T, N > const &other) const
Cross product between this and another vector.
bool is_similar(Vector< T, N > const &other, T const &epsilon) const
Component-wise similarity using epsilon checks.
#define FSSR_NAMESPACE_END
#define FSSR_NAMESPACE_BEGIN
void rotation_from_normal(math::Vec3f const &normal, math::Matrix3f *rot)
Generates a rotation matrix that transforms in the FSSR LCS.
void evaluate(math::Vec3f const &pos, Sample const &sample, double *value, double *weight, math::Vector< double, 3 > *value_deriv, math::Vector< double, 3 > *weight_deriv)
Rotates the given point in the LCS of the sample, evaluates the basis and weight functions and their ...
Matrix< T, N, N > & matrix_set_identity(Matrix< T, N, N > *mat)
Sets the given square matrix to the identity matrix.
Representation of a point sample.