41 if(v_ids.size() == 3){
44 cp[0] = pnts[v_ids[0]-1];
45 cp[1] = pnts[v_ids[1]-1];
46 cp[2] = pnts[v_ids[2]-1];
47 cp[3] = (2.0*cp[0]+cp[2])/3.0;
48 cp[4] = (2.0*cp[0]+cp[1])/3.0;
49 cp[5] = (2.0*cp[1]+cp[0])/3.0;
50 cp[6] = (2.0*cp[1]+cp[2])/3.0;
51 cp[7] = (2.0*cp[2]+cp[1])/3.0;
52 cp[8] = (2.0*cp[2]+cp[0])/3.0;
54 int r_ind[3] = {4,6,8};
55 int l_ind[3] = {3,5,7};
57 for(
int k =0;
k < 3; ++
k){
58 int v_ind =
k, t_ind = (4+
k)%3;
59 int v_id = v_ids[v_ind], t_id = v_ids[t_ind];
87 cp[6]+cp[7]+cp[8])/6.0;
90 double w = bcoords[0], u = bcoords[1];
92 double w2 = w*w, u2 = u*u, v2=v*
v;
94 ans = ( cp[0]*w2*w + cp[1]*u2*u + cp[2]*v2*v +
95 3.0*(cp[3]*w2*v + cp[4]*w2*u + cp[5]*u2*w +
96 cp[6]*u2*v + cp[7]*v2*u + cp[8]*v2*w) +
121 switch(tranks[v_id]) {
123 f = (vp_vect)*evects[3*v_id]*evects[3*v_id];
128 f = vp_vect - vp_vect*evects[3*v_id+2]*evects[3*v_id+2];
138 f = vp_vect*n_os*n_os;
151 p2_crd += f - 2.0*f*tangent*tangent;
162 int i = ((evects[3*id1-3]*bs[id1-1]/-evals[id1-1][0]) >
163 (evects[3*id1-2]*bs[id1-1]/-evals[id1-1][1])) ? 0 : 1;
167 pnts[id3-1]-pnts[id1-1]);
void int int REAL REAL * y
#define COM_assertion_msg(EX, msg)
MOP_BEGIN_NAMESPACE Vector_3< double > PN_project(std::vector< int * > v_ids, Vector_3< double > bcoords, const Vector_3< double > *pnts, const Vector_3< double > *vnrms, const Vector_3< double > *evects, const Vector_3< double > *evals, const Vector_3< double > *bs, const int *tranks, std::vector< bool > is_ridge[4])
Vector_3< double > one_sided_normal(int id1, int id2, int id3, const Vector_3< double > *evects, const Vector_3< double > *pnts, const Vector_3< double > *evals, const Vector_3< double > *vnorms, const Vector_3< double > *bs)
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
#define MOP_END_NAMESPACE
static Vector_3 cross_product(const Vector_3 &v, const Vector_3 &w)
void project_edge(int v_id, int t_id, int id3, Vector_3< double > v_crd, Vector_3< double > t_crd, Vector_3< double > &p_crd, Vector_3< double > &p2_crd, const Vector_3< double > *pnts, const Vector_3< double > *vnrms, const Vector_3< double > *evects, const Vector_3< double > *evals, const Vector_3< double > *bs, const int *tranks, bool is_ridge)
#define MOP_BEGIN_NAMESPACE