40 #ifndef H_HEXDOM_ALGO_GEOMETRY_H
41 #define H_HEXDOM_ALGO_GEOMETRY_H
44 #include <exploragram/hexdom/basic.h>
53 CoTan3D(
vec3 P[4],
double* anisotropy_as_xx_yy_zz_xy_yz_xz =
nullptr);
59 void check_for_grad(
vec3 P[4],
vec3 grad);
100 bool is_flat()
const {
return is_flat_; }
102 vec3 gradient_3d(
double value0,
double value1,
double value2)
const;
116 if (std::fabs(v[2].z) < .8)
117 v[0] = cross(v[2],
vec3(0, 0, 1));
118 else v[0] = cross(v[2],
vec3(1, 0, 0));
119 v[0] = normalize(v[0]);
120 v[1] = cross(v[2], v[0]);
121 geo_assert(std::abs(v[1].length2() - 1) < .001);
124 return vec2(dot(in, v[0]), dot(in, v[1]));
127 return in[0] * v[0] + in[1] * v[1];
147 void point(
const vec3& p,
double weight = 1.0);
149 double eigen_value[3];
177 double V0[3],
double V1[3],
double V2[3],
178 double U0[3],
double U1[3],
double U2[3]
195 float boxcenter[3],
float boxhalfsize[3],
float triverts[3][3]
#define geo_assert(x)
Verifies that a condition is met.
double TX(index_t i) const
double TY(index_t i) const
void basis(vec3 &origin, vec3 &X, vec3 &Y, vec3 &Z) const
const vec3 & vertex(index_t i) const
#define EXPLORAGRAM_API
Linkage declaration for exploragram symbols.
Included by all headers in exploragram.
Geometric functions in 2d and 3d.
Global Vorpaline namespace.
vecng< 3, Numeric::float64 > vec3
Represents points and vectors in 3d.
geo_index_t index_t
The type for storing and manipulating indices.
void initialize(int flags=GEOGRAM_INSTALL_NONE)
Initialize Geogram.
vecng< 2, Numeric::float64 > vec2
Represents points and vectors in 2d.