public void WorldPointToScreenPoints(Vector3 worldPoint, ref List <RUISDisplayManager.ScreenPoint> screenPoints) { if (isStereo) { RUISDisplayManager.ScreenPoint leftCameraPoint = new RUISDisplayManager.ScreenPoint(); leftCameraPoint.camera = linkedCamera.leftCamera; leftCameraPoint.coordinates = leftCameraPoint.camera.WorldToScreenPoint(worldPoint); screenPoints.Add(leftCameraPoint); RUISDisplayManager.ScreenPoint rightCameraPoint = new RUISDisplayManager.ScreenPoint(); rightCameraPoint.camera = linkedCamera.rightCamera; rightCameraPoint.coordinates = rightCameraPoint.camera.WorldToScreenPoint(worldPoint); screenPoints.Add(rightCameraPoint); } else { RUISDisplayManager.ScreenPoint screenPoint = new RUISDisplayManager.ScreenPoint(); screenPoint.camera = linkedCamera.centerCamera; screenPoint.coordinates = screenPoint.camera.WorldToScreenPoint(worldPoint); screenPoints.Add(screenPoint); } }
public void WorldPointToScreenPoints(Vector3 worldPoint, ref List<RUISDisplayManager.ScreenPoint> screenPoints) { if (isStereo) { RUISDisplayManager.ScreenPoint leftCameraPoint = new RUISDisplayManager.ScreenPoint(); leftCameraPoint.camera = linkedCamera.leftCamera; leftCameraPoint.coordinates = leftCameraPoint.camera.WorldToScreenPoint(worldPoint); screenPoints.Add(leftCameraPoint); RUISDisplayManager.ScreenPoint rightCameraPoint = new RUISDisplayManager.ScreenPoint(); rightCameraPoint.camera = linkedCamera.rightCamera; rightCameraPoint.coordinates = rightCameraPoint.camera.WorldToScreenPoint(worldPoint); screenPoints.Add(rightCameraPoint); } else { RUISDisplayManager.ScreenPoint screenPoint = new RUISDisplayManager.ScreenPoint(); screenPoint.camera = linkedCamera.centerCamera; screenPoint.coordinates = screenPoint.camera.WorldToScreenPoint(worldPoint); screenPoints.Add(screenPoint); } }