| 142 | }; |
| 143 | |
| 144 | inline float* vtkUnstructuredGridPreIntegration::GetIndexedTableEntry( |
| 145 | int scalar_front_index, int scalar_back_index, int length_index, int component) |
| 146 | { |
| 147 | // Snap entries to bounds. I don't really want to spend cycles doing |
| 148 | // this, but I've had the ray caster give me values that are noticeably |
| 149 | // out of bounds. |
| 150 | scalar_front_index = std::max(scalar_front_index, 0); |
| 151 | scalar_front_index = std::min(scalar_front_index, this->IntegrationTableScalarResolution - 1); |
| 152 | scalar_back_index = std::max(scalar_back_index, 0); |
| 153 | scalar_back_index = std::min(scalar_back_index, this->IntegrationTableScalarResolution - 1); |
| 154 | length_index = std::max(length_index, 0); |
| 155 | length_index = std::min(length_index, this->IntegrationTableLengthResolution - 1); |
| 156 | |
| 157 | return (this->IntegrationTable[component] + |
| 158 | 4 * |
| 159 | (((length_index * this->IntegrationTableScalarResolution + scalar_back_index) * |
| 160 | this->IntegrationTableScalarResolution) + |
| 161 | scalar_front_index)); |
| 162 | } |
| 163 | |
| 164 | inline float* vtkUnstructuredGridPreIntegration::GetTableEntry( |
| 165 | double scalar_front, double scalar_back, double length, int component) |
no test coverage detected