getting multiple intersection points through callback function
조회 수: 5 (최근 30일)
이전 댓글 표시
patch('Faces',T,'Vertices',V,'FaceColor','white','ButtonDownFcn',@MyCallback)
axis equal;
pointCo = getappdata(0, 'point');
function MyCallback(src,eventData)
p = eventData.IntersectionPoint;
setappdata(0, 'point', p);
end
The goal of the above code is to return the coordinates of the points I clicked on a 3d surface triangular mesh. I am very new callbacks so I hope this is not very hard.
Question 1: The code is functioning if I only care for a triplet of coordinates of one intersection point. How can I return the coordinates of multiple ones (by clicking many times on the mesh and coordinates not overriding each other)?
Question 2: If I want an intersection point that is currently not visible from the viewing angle in the figure created by patch, I need to add cameratoolbar to rotate the mesh. The moment I add cameratoolbar it seems like it stops working.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!