Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Perf] i can`t pick the right clicked actor useing vtkPicker #3195

Open
moneyfirst-yh opened this issue Dec 20, 2024 · 0 comments
Open

[Perf] i can`t pick the right clicked actor useing vtkPicker #3195

moneyfirst-yh opened this issue Dec 20, 2024 · 0 comments

Comments

@moneyfirst-yh
Copy link

High-level description

i want get the actor that mouse clicked. but picker allways get an actor list and i cant get the right one

Steps to reproduce

` this.splitonLeftButtonPress = interactor.onLeftButtonPress(
(callData) => {
const pos = callData.position;

        picker.pick([pos.x, pos.y, 0], this.renderer);

        const pickedActors = picker.getActors();
        console.log(pickedActors, "xxxx");

        if (pickedActors.length > 0) {
          pickedActor = pickedActors[0];

          console.log(pickedActor.get("name"), "---------------");

          lastPosition = pos;
          console.log("actorPosition:", pickedActor.getPosition());
          console.log("pickPosition:", picker.getPickPosition());
        }
      }
    )`

Detailed Current Behavior

cant get the one that i clicked

Environment

  • vtk.js version:32.6.1
  • Browsers:chrome
  • OS:win10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant