PointsConverter.js 328 B

123456789101112131415
  1. function convertToVTKPoints(worldPoints) {
  2. worldPoints.forEach(item => {
  3. let temp = item.y;
  4. item.y = -item.z;
  5. item.z = temp;
  6. });
  7. }
  8. function convertBackToWorldPoints(vtkPoints) {
  9. vtkPoints.forEach(item => {
  10. let temp = item.Y;
  11. item.Y = item.Z;
  12. item.Z = -temp;
  13. });
  14. }