40 #ifndef GEOGRAM_MESH_MESH_FRAME_FIELD
41 #define GEOGRAM_MESH_MESH_FRAME_FIELD
98 const Mesh& M,
bool volumetric,
const std::string& filename
113 const Mesh& M,
bool volumetric,
double sharp_angle_threshold=45.0
125 return NN_->get_nearest_neighbor(p);
138 index_t fi = get_nearest_frame_index(p);
139 for(
index_t c = 0; c < 9; ++c) {
140 f[c] = frames_[fi * 9 + c];
162 static void scale_frame_vector(
double* frame,
const vec3& N,
double s);
175 NearestNeighborSearch_var NN_;
#define geo_assert(x)
Verifies that a condition is met.
Represents a 3D frame field, i.e. a function that associates a 3d orthonormal basis to each point in ...
void create_from_surface_mesh(const Mesh &M, bool volumetric, double sharp_angle_threshold=45.0)
Creates a frame field that matches a given mesh.
bool load(const Mesh &M, bool volumetric, const std::string &filename)
Loads a frame field from a file.
FrameField()
Constructs a new uninitialized FrameField.
const vector< double > & frames() const
Gets the vector that contains all the frames coordinates.
static void fix_frame(double *frame, const vec3 &N)
Fixes a frame in such a way that it is orthogonal to a given vector.
index_t get_nearest_frame_index(const double *p) const
Gets the index of the frame nearest to a given point.
void get_nearest_frame(const double *p, double *f) const
Gets the frame nearest to a given point.
void set_use_spatial_search(bool x)
Specifies whether a spatial search structure should be created.
Common include file, providing basic definitions. Should be included before anything else by all head...
Geometric functions in 2d and 3d.
Global Vorpaline namespace.
geo_index_t index_t
The type for storing and manipulating indices.
Abstract interface for nearest neighbor searching.