| 144 | } |
| 145 | |
| 146 | int vtkCollisionDetectionFilter::GetNumberOfContacts() |
| 147 | { |
| 148 | if (this->GetOutput(0) && this->GetOutput(0)->GetFieldData()->GetArray("ContactCells")) |
| 149 | { |
| 150 | return this->GetOutput(0)->GetFieldData()->GetArray("ContactCells")->GetNumberOfTuples(); |
| 151 | } |
| 152 | else |
| 153 | { |
| 154 | vtkErrorMacro( |
| 155 | << "Number of contacts cannot be calculated, nullptr found! Call Update() before."); |
| 156 | return -1; |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | void vtkCollisionDetectionFilter::SetTransform(int i, vtkLinearTransform* transform) |
| 161 | { |