VR CAD Viewer 1.0
Qt and VTK application for loading and visualising CAD models with VR support
Loading...
Searching...
No Matches
VRRenderThread Class Reference

#include <VRRenderThread.h>

Inheritance diagram for VRRenderThread:
Collaboration diagram for VRRenderThread:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ VRRenderThread()

VRRenderThread::VRRenderThread ( QObject *  parent = nullptr)
explicit

Constructor

Parameters
parentis the parent QObject (usually the MainWindow)

Member Function Documentation

◆ addActorOffline()

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).

Parameters
actoris the VTK actor to add to the VR scene

◆ animationIsEnabled()

bool VRRenderThread::animationIsEnabled ( ) const

Check whether VR animation is currently enabled.

Returns
true if animation is running, false if not

◆ queueVRPipelineUpdate()

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.

Parameters
partis the ModelPart needing a pipeline update

◆ resetView()

void VRRenderThread::resetView ( )

Request the VR camera and actor positions to be reset back to defaults.

◆ run()

void VRRenderThread::run ( )
overrideprotected

Main thread function - runs the VR render loop until stopVR() is called.

◆ setAnimationEnabled()

void VRRenderThread::setAnimationEnabled ( bool  enabled)

Enable or disable the VR rotation animation.

Parameters
enabledis true to start animation, false to stop it

◆ stopVR()

void VRRenderThread::stopVR ( )

Request the VR rendering loop to stop. The thread will finish its current frame before stopping.

◆ toggleExplode()

void VRRenderThread::toggleExplode ( )

Toggle the explode view animation on or off. If currently collapsed, parts will animate outward, and vice versa.


The documentation for this class was generated from the following files: