|
VR CAD Viewer 1.0
Qt and VTK application for loading and visualising CAD models with VR support
|
#include <VRRenderThread.h>


Public Member Functions | |
| VRRenderThread (QObject *parent=nullptr) | |
| void | addActorOffline (vtkSmartPointer< vtkActor > actor) |
| void | queueVRPipelineUpdate (ModelPart *part) |
| void | stopVR () |
| void | resetView () |
| void | toggleExplode () |
| void | setAnimationEnabled (bool enabled) |
| bool | animationIsEnabled () const |
Protected Member Functions | |
| void | run () override |
Thread class that handles all VR rendering separately from the Qt GUI. Runs the OpenVR render loop, manages actors, handles live updates from the GUI, and controls animation and explode view.
|
explicit |
Constructor
| parent | is the parent QObject (usually the MainWindow) |
| void VRRenderThread::addActorOffline | ( | vtkSmartPointer< vtkActor > | actor | ) |
Add an actor to be rendered in VR. Must be called before the thread starts (use queueVRPipelineUpdate for live updates).
| actor | is the VTK actor to add to the VR scene |
| bool VRRenderThread::animationIsEnabled | ( | ) | const |
Check whether VR animation is currently enabled.
| void VRRenderThread::queueVRPipelineUpdate | ( | ModelPart * | part | ) |
Queue a model part so its VR rendering pipeline gets updated on the next frame. Safe to call while VR is running.
| part | is the ModelPart needing a pipeline update |
| void VRRenderThread::resetView | ( | ) |
Request the VR camera and actor positions to be reset back to defaults.
|
overrideprotected |
Main thread function - runs the VR render loop until stopVR() is called.
| void VRRenderThread::setAnimationEnabled | ( | bool | enabled | ) |
Enable or disable the VR rotation animation.
| enabled | is true to start animation, false to stop it |
| void VRRenderThread::stopVR | ( | ) |
Request the VR rendering loop to stop. The thread will finish its current frame before stopping.
| void VRRenderThread::toggleExplode | ( | ) |
Toggle the explode view animation on or off. If currently collapsed, parts will animate outward, and vice versa.