5 Commits

Author SHA1 Message Date
AndreaRigoni
49cf0aeedd feat: disable camera spin/inertia by introducing a custom interactor style.r 2026-03-06 17:31:29 +00:00
40846bba78 Update .gitea/workflows/publish-docs.yaml
All checks were successful
MkDocs Subpath Deploy / build-and-deploy (push) Successful in 11s
2026-03-06 17:52:45 +01:00
4d681e3373 Update .gitea/workflows/publish-docs.yaml
Some checks failed
MkDocs Subpath Deploy / build-and-deploy (push) Failing after 12s
2026-03-06 17:51:53 +01:00
3a9efd5598 Update .gitea/workflows/publish-docs.yaml 2026-03-06 17:50:13 +01:00
fa1930f9d7 Merge pull request 'andrea-dev' (#1) from andrea-dev into main
Reviewed-on: #1
added CUDA for images and raytracing, added python bindings via pybind11, removed LTK, added documentation
2026-03-06 17:17:52 +01:00
2 changed files with 28 additions and 2 deletions

View File

@@ -1,9 +1,10 @@
name: MkDocs Subpath Deploy name: MkDocs Subpath Deploy
on: on:
workflow_dispatch: # trigger manuale
push: push:
branches: branches:
- andrea-dev # Trigger on main branch - main # Trigger on main branch
jobs: jobs:
build-and-deploy: build-and-deploy:
@@ -22,7 +23,7 @@ jobs:
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install mkdocs-material pip install mkdocs-material
pip install -r requirements.txt pip install -r docs/docker/requirements.txt
- name: Build del sito - name: Build del sito
run: mkdocs build run: mkdocs build

View File

@@ -37,9 +37,29 @@
#include <vtkTextProperty.h> #include <vtkTextProperty.h>
#include <vtkAxesActor.h> #include <vtkAxesActor.h>
#include <vtkCamera.h> #include <vtkCamera.h>
#include <vtkInteractorStyleTrackballCamera.h>
#include <vtkObjectFactory.h>
#include "uLibVtkViewer.h" #include "uLibVtkViewer.h"
// Custom interactor style: disables spin/inertia so the scene only
// rotates while the mouse is actively being moved with the button held.
class vtkInteractorStyleNoSpin : public vtkInteractorStyleTrackballCamera
{
public:
static vtkInteractorStyleNoSpin *New();
vtkTypeMacro(vtkInteractorStyleNoSpin, vtkInteractorStyleTrackballCamera);
// Override: when the left button is released, immediately stop any
// ongoing motion (rotation/spin) so no momentum is carried over.
void OnLeftButtonUp() override
{
this->StopState();
vtkInteractorStyleTrackballCamera::OnLeftButtonUp();
}
};
vtkStandardNewMacro(vtkInteractorStyleNoSpin);
namespace uLib { namespace uLib {
namespace Vtk { namespace Vtk {
@@ -75,6 +95,11 @@ void Viewer::InstallPipe()
vtkSmartPointer<vtkRenderWindowInteractor>::New(); vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(m_RenderWindow); renderWindowInteractor->SetRenderWindow(m_RenderWindow);
// Use a custom style with no spin/inertia
vtkSmartPointer<vtkInteractorStyleNoSpin> style =
vtkSmartPointer<vtkInteractorStyleNoSpin>::New();
renderWindowInteractor->SetInteractorStyle(style);
// annotation // // annotation //
m_Annotation->GetTextProperty()->SetColor(1,1,1); m_Annotation->GetTextProperty()->SetColor(1,1,1);
m_Annotation->GetTextProperty()->SetFontFamilyToArial(); m_Annotation->GetTextProperty()->SetFontFamilyToArial();