Skip to content

Commit

Permalink
Interactor: Make SetViewOrbit not static (#1695)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal authored Nov 7, 2024
1 parent 15d0b19 commit 7f47e55
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions library/src/interactor_impl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,12 @@ class interactor_impl::internals
VT_TOP,
VT_ISOMETRIC
};
static void SetViewOrbit(ViewType view, internals* self)

void SetViewOrbit(ViewType view)
{
vtkNew<vtkMatrix3x3> transform;
self->ToEnvironmentSpace(transform);
camera& cam = self->Window.getCamera();
this->ToEnvironmentSpace(transform);
camera& cam = this->Window.getCamera();
vector3_t up = { 0, 0, 1 };
point3_t foc = cam.getFocalPoint();
point3_t axis, newPos;
Expand Down Expand Up @@ -687,19 +688,19 @@ interactor_impl::interactor_impl(options& options, window_impl& window, scene_im
std::string_view type = args[0];
if (type == "front")
{
this->Internals->SetViewOrbit(internals::ViewType::VT_FRONT, this->Internals.get());
this->Internals->SetViewOrbit(internals::ViewType::VT_FRONT);
}
else if (type == "top")
{
this->Internals->SetViewOrbit(internals::ViewType::VT_TOP, this->Internals.get());
this->Internals->SetViewOrbit(internals::ViewType::VT_TOP);
}
else if (type == "right")
{
this->Internals->SetViewOrbit(internals::ViewType::VT_RIGHT, this->Internals.get());
this->Internals->SetViewOrbit(internals::ViewType::VT_RIGHT);
}
else if (type == "isometric")
{
this->Internals->SetViewOrbit(internals::ViewType::VT_ISOMETRIC, this->Internals.get());
this->Internals->SetViewOrbit(internals::ViewType::VT_ISOMETRIC);
}
else
{
Expand Down

0 comments on commit 7f47e55

Please sign in to comment.