Skip to content

Commit

Permalink
expose functions to show/hide transform gizmo
Browse files Browse the repository at this point in the history
  • Loading branch information
nmwsharp committed Jan 5, 2025
1 parent edb6a36 commit f9e70ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/polyscope/structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ class Structure : public render::ManagedBufferRegistry, public virtual WeakRefer
Structure* setIgnoreSlicePlane(std::string name, bool newValue);
bool getIgnoreSlicePlane(std::string name);

Structure* setTransformGizmoEnabled(bool newVal);
bool getTransformGizmoEnabled();

protected:
// = State
PersistentValue<bool> enabled;
Expand Down
8 changes: 8 additions & 0 deletions src/structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,14 @@ Structure* Structure::setCullWholeElements(bool newVal) {
}
bool Structure::getCullWholeElements() { return cullWholeElements.get(); }


Structure* Structure::setTransformGizmoEnabled(bool newVal) {
transformGizmo.enabled = newVal;
requestRedraw();
return this;
}
bool Structure::getTransformGizmoEnabled() { return transformGizmo.enabled.get(); }

Structure* Structure::setIgnoreSlicePlane(std::string name, bool newValue) {

if (getIgnoreSlicePlane(name) == newValue) {
Expand Down

0 comments on commit f9e70ec

Please sign in to comment.