------------------------------------------------------------------------------
| 1007 | |
| 1008 | //------------------------------------------------------------------------------ |
| 1009 | void vtkPiecewiseFunction::FillFromDataPointer(int nb, double* ptr) |
| 1010 | { |
| 1011 | if (nb <= 0 || !ptr) |
| 1012 | { |
| 1013 | return; |
| 1014 | } |
| 1015 | |
| 1016 | this->RemoveAllPoints(); |
| 1017 | |
| 1018 | double* inPtr = ptr; |
| 1019 | |
| 1020 | int i; |
| 1021 | for (i = 0; i < nb; i++) |
| 1022 | { |
| 1023 | vtkPiecewiseFunctionNode* node = new vtkPiecewiseFunctionNode; |
| 1024 | node->X = inPtr[0]; |
| 1025 | node->Y = inPtr[1]; |
| 1026 | node->Sharpness = 0.0; |
| 1027 | node->Midpoint = 0.5; |
| 1028 | |
| 1029 | this->Internal->Nodes.push_back(node); |
| 1030 | inPtr += 2; |
| 1031 | } |
| 1032 | |
| 1033 | this->SortAndUpdateRange(); |
| 1034 | } |
| 1035 | |
| 1036 | //------------------------------------------------------------------------------ |
| 1037 | void vtkPiecewiseFunction::UpdateSearchMethod(double epsilon, double thresh) |
nothing calls this directly
no test coverage detected