40 #ifndef H_HEXDOM_ALGO_SPHERICALHARMONICSL4_H
41 #define H_HEXDOM_ALGO_SPHERICALHARMONICSL4_H
44 #include <exploragram/hexdom/basic.h>
54 FOR(i, 9) coeff[i] = 0.;
61 FOR(i, 9) coeff[i] = fv[i];
65 double x0,
double x1,
double x2,
66 double x3,
double x4,
double x5,
67 double x6,
double x7,
double x8
69 coeff[0] = x0; coeff[1] = x1; coeff[2] = x2;
70 coeff[3] = x3; coeff[4] = x4; coeff[5] = x5;
71 coeff[6] = x6; coeff[7] = x7; coeff[8] = x8;
80 return coeff.length();
84 return dot(coeff, other.coeff);
103 double value(
const vec3& v)
const {
105 FOR(i, 9)res += coeff[i]*basis(i,v);
111 void Rz(
double alpha);
112 void Ry(
double alpha);
113 void Rx(
double alpha);
115 void euler_rot(
const vec3& rot_vec) {
129 mat3 project_mat3(
double grad_threshold = 1e-3,
double dot_threshold = 1e-5,
vec3* euler_prev =
nullptr);
134 return input >> gna.coeff;
137 inline std::ostream& operator<< (std::ostream& output,
const SphericalHarmonicL4 &gna) {
138 return output << gna.coeff;
#define geo_debug_assert(x)
Verifies that a condition is met.
Generic mechanism for attributes.
#define EXPLORAGRAM_API
Linkage declaration for exploragram symbols.
Included by all headers in exploragram.
The class that represents a mesh.
Global Vorpaline namespace.
Quaternion operator-(const Quaternion &a, const Quaternion &b)
Computes the difference between two Quaternion.
geo_index_t index_t
The type for storing and manipulating indices.
Quaternion operator+(const Quaternion &a, const Quaternion &b)
Computes the sum of two Quaternion.