Skip to content

Commit f9e70ec

Browse files
committed
expose functions to show/hide transform gizmo
1 parent edb6a36 commit f9e70ec

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

include/polyscope/structure.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ class Structure : public render::ManagedBufferRegistry, public virtual WeakRefer
110110
Structure* setIgnoreSlicePlane(std::string name, bool newValue);
111111
bool getIgnoreSlicePlane(std::string name);
112112

113+
Structure* setTransformGizmoEnabled(bool newVal);
114+
bool getTransformGizmoEnabled();
115+
113116
protected:
114117
// = State
115118
PersistentValue<bool> enabled;

src/structure.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ Structure* Structure::setCullWholeElements(bool newVal) {
310310
}
311311
bool Structure::getCullWholeElements() { return cullWholeElements.get(); }
312312

313+
314+
Structure* Structure::setTransformGizmoEnabled(bool newVal) {
315+
transformGizmo.enabled = newVal;
316+
requestRedraw();
317+
return this;
318+
}
319+
bool Structure::getTransformGizmoEnabled() { return transformGizmo.enabled.get(); }
320+
313321
Structure* Structure::setIgnoreSlicePlane(std::string name, bool newValue) {
314322

315323
if (getIgnoreSlicePlane(name) == newValue) {

0 commit comments

Comments
 (0)