38 double point[3], point1[3], point2[3];
39 double vector1[3], vector2[3];
46 this->
DataSet->GetPoint(boundaryPointId,point1);
47 this->
DataSet->GetPoint(boundaryNeighborPointId,point2);
49 vector1[0] = point1[0] - point[0];
50 vector1[1] = point1[1] - point[1];
51 vector1[2] = point1[2] - point[2];
53 vector2[0] = point2[0] - point[0];
54 vector2[1] = point2[1] - point[1];
55 vector2[2] = point2[2] - point[2];
59 boundaryWeight = vtkMath::Distance2BetweenPoints(point,point2);
60 boundaryNeighborWeight = vtkMath::Dot(vector1,vector2);
70 boundaryNeighborWeight = 0.0;
76 boundaryWeight /= 4.0 * triangleArea;
77 boundaryNeighborWeight /= 4.0 * triangleArea;
83 double point[3], point1[3], point2[3];
84 double boundaryWeight, boundaryNeighborWeight;
86 vtkIdType j, firstId, lastId;
90 vtkPolyData* pdata = vtkPolyData::SafeDownCast(this->
DataSet);
105 for (j=0; j<this->
NPoints; j++)
108 for (j=firstId; j<=lastId; j++)
110 pdata->GetPoint(this->
PointIds[j],point1);
112 pdata->GetPoint(this->
PointIds[(j+1)%this->NPoints],point2);
115 this->
Weights[j] += cotangent / 2.0;
118 this->
Weights[(j+1)%this->NPoints] += cotangent / 2.0;
124 this->
Weights[0] += boundaryWeight;
125 this->
Weights[1] += boundaryNeighborWeight;
128 this->
Weights[this->NPoints-1] += boundaryWeight;
129 this->
Weights[this->NPoints-2] += boundaryNeighborWeight;
133 for (j=0; j<this->NPoints; j++)