36 #include "Vector3D.hpp"
37 #include "QualityMetric.hpp"
38 #include "MsqVertex.hpp"
39 #include "PatchData.hpp"
42 #ifdef MSQ_USE_OLD_STD_HEADERS
49 using namespace Mesquite;
57 vector<size_t> adj_verts;
60 int num_sample_points=adj_verts.size();
61 double *metric_values=
new double[num_sample_points];
64 while(!adj_verts.empty()){
65 other_vert=adj_verts.back();
67 edg[0]=verts[this_vert][0]-verts[other_vert][0];
68 edg[1]=verts[this_vert][1]-verts[other_vert][1];
69 edg[2]=verts[this_vert][2]-verts[other_vert][2];
70 metric_values[point_counter]=edg.
length();
74 delete[] metric_values;
#define MSQ_ERRZERO(err)
Return zero/NULL on error.
Used to hold the error state and return it to the application.
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
size_t get_vertex_index(MsqVertex *vertex)
void get_adjacent_vertex_indices(size_t vertex_index, msq_std::vector< size_t > &vert_indices, MsqError &err)
bool evaluate_vertex(PatchData &pd, MsqVertex *vert, double &fval, MsqError &err)
Evaluate the metric for a vertex.
const MsqVertex * get_vertex_array(MsqError &err) const
Returns a pointer to the start of the vertex array.
double average_metrics(const double metric_values[], const int &num_values, MsqError &err)
average_metrics takes an array of length num_values and averages the contents using averaging method ...
MsqVertex is the Mesquite object that stores information about the vertices in the mesh...