File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -808,7 +808,7 @@ void callback() {
808808
809809 glm::vec3 worldRay = polyscope::view::screenCoordsToWorldRay (screenCoords);
810810 glm::vec3 worldPos = polyscope::view::screenCoordsToWorldPosition (screenCoords);
811- std::pair< polyscope::Structure*, size_t > pickPair = polyscope::pick::pickAtScreenCoords (screenCoords);
811+ polyscope::PickResult pickResult = polyscope::queryPickAtScreenCoords (screenCoords);
812812
813813 std::cout << " Polyscope scene test click " << std::endl;
814814 std::cout << " io.MousePos.x: " << io.MousePos .x << " io.MousePos.y: " << io.MousePos .y << std::endl;
@@ -818,11 +818,12 @@ void callback() {
818818 polyscope::operator <<(std::cout, worldRay) << std::endl;
819819 std::cout << " worldPos: " ;
820820 polyscope::operator <<(std::cout, worldPos) << std::endl;
821- if (pickPair.first == nullptr ) {
821+ if (pickResult.isHit ) {
822+ std::cout << " structure: " << pickResult.structureType << " " << pickResult.structureName
823+ << " local ind: " << pickResult.localIndex << std::endl;
824+ } else {
822825 std::cout << " structure: "
823826 << " none" << std::endl;
824- } else {
825- std::cout << " structure: " << pickPair.first << " element id: " << pickPair.second << std::endl;
826827 }
827828
828829 // Construct point at click location
You can’t perform that action at this time.
0 commit comments