bool normalOrder = isPointingCorrectly(firstIndex, firstIndex+increment, centroid, contraryId);
centroidId = points->InsertNextPoint(centroid[0], centroid[1], centroid[2]);
vtkSmartPointer<vtkTriangleStrip> triangleStrip1 = vtkSmartPointer<vtkTriangleStrip>::New();
bool normalOrder = isPointingCorrectly(firstIndex, firstIndex+increment, centroid, contraryId);
centroidId = points->InsertNextPoint(centroid[0], centroid[1], centroid[2]);
vtkSmartPointer<vtkTriangleStrip> triangleStrip1 = vtkSmartPointer<vtkTriangleStrip>::New();
if( normalOrder )
{
int initial = firstIndex;
int triangleIndex = 0;
for(int index = initial; index < end; index+=increment){
triangleStrip1->GetPointIds()->SetId(triangleIndex,index);
if( normalOrder )
{
int initial = firstIndex;
int triangleIndex = 0;
for(int index = initial; index < end; index+=increment){
triangleStrip1->GetPointIds()->SetId(triangleIndex,index);
- triangleStrip1->GetPointIds()->SetId(triangleIndex+2,initial);
- triangleStrip1->GetPointIds()->SetId(triangleIndex+3,centroidId);
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+1,initial);//2
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+2,centroidId);//3
+ }
+ else{
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+1,centroidId);//1
int triangleStripStart = end-1;
for(int index = triangleStripStart; index > initial; index-=increment){
triangleStrip1->GetPointIds()->SetId(triangleIndex,index);
int triangleStripStart = end-1;
for(int index = triangleStripStart; index > initial; index-=increment){
triangleStrip1->GetPointIds()->SetId(triangleIndex,index);
- triangleStrip1->GetPointIds()->SetId(triangleIndex+2,triangleStripStart);
- triangleStrip1->GetPointIds()->SetId(triangleIndex+3,centroidId);
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+1,triangleStripStart);
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+2,centroidId);
+ }else{
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+1,centroidId);
- points->GetPoint(i+1, point2);
- points->GetPoint(i+2, point3);
+ points->GetPoint(i+5, point2);
+ points->GetPoint(i+10, point3);
firstRadiusSum += vtkMath::Solve3PointCircle(point1, point2, point3, center);
}
}
firstRadiusSum += vtkMath::Solve3PointCircle(point1, point2, point3, center);
}
}
- for(int i = 0; i < sizePoints && lstIndexs.size() > 3; i+=(lstIndexs[0]*3)){
- if(i+(3*lstIndexs[0]) <= sizePoints){
+ for(int i = 0; i < sizePoints && lstIndexs.size() > 9; i+=(lstIndexs.size()*5)){
+ if(i+(10*lstIndexs.size()) < sizePoints){
- points->GetPoint(i+lstIndexs[0], point2);
- points->GetPoint(i+(2*lstIndexs[0]), point3);
+ points->GetPoint(i+(5*lstIndexs.size()), point2);
+ points->GetPoint(i+(10*lstIndexs.size()), point3);
secondRadiusSum += vtkMath::Solve3PointCircle(point1, point2, point3, center);
}
}
secondRadiusSum += vtkMath::Solve3PointCircle(point1, point2, point3, center);
}
}