CAD Viewer
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes | List of all members
VRRenderThread Class Reference

#include "VRRenderThread.h"

Inheritance diagram for VRRenderThread:
Inheritance graph
[legend]
Collaboration diagram for VRRenderThread:
Collaboration graph
[legend]

Public Types

enum  { END_RENDER , ROTATE_X , ROTATE_Y , ROTATE_Z }
 

Public Member Functions

 VRRenderThread (QObject *parent=nullptr)
 
 ~VRRenderThread ()
 
void addActorOffline (vtkActor *actor)
 
void issueCommand (int cmd, double value)
 

Public Attributes

enum VRRenderThread:: { ... }  Command
 

Protected Member Functions

void run () override
 

Private Attributes

vtkSmartPointer< vtkOpenVRRenderWindow > window
 
vtkSmartPointer< vtkOpenVRRenderWindowInteractor > interactor
 
vtkSmartPointer< vtkOpenVRRenderer > renderer
 
vtkSmartPointer< vtkOpenVRCamera > camera
 
QMutex mutex
 
QWaitCondition condition
 
vtkSmartPointer< vtkActorCollection > actors
 
std::chrono::time_point< std::chrono::steady_clock > t_last
 
bool endRender
 
double rotateX
 
double rotateY
 
double rotateZ
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

List of command names

Enumerator
END_RENDER 
ROTATE_X 
ROTATE_Y 
ROTATE_Z 

Constructor & Destructor Documentation

◆ VRRenderThread()

VRRenderThread::VRRenderThread ( QObject *  parent = nullptr)

Constructor

◆ ~VRRenderThread()

VRRenderThread::~VRRenderThread ( )

Denstructor

Member Function Documentation

◆ addActorOffline()

void VRRenderThread::addActorOffline ( vtkActor *  actor)

This allows actors to be added to the VR renderer BEFORE the VR interactor has been started

Here is the caller graph for this function:

◆ issueCommand()

void VRRenderThread::issueCommand ( int  cmd,
double  value 
)

This allows commands to be issued to the VR thread in a thread safe way. Function will set variables within the class to indicate the type of action / animation / etc to perform. The rendering thread will then impelement this.

Here is the caller graph for this function:

◆ run()

void VRRenderThread::run ( )
overrideprotected

This is a re-implementation of a QThread function

Member Data Documentation

◆ actors

vtkSmartPointer<vtkActorCollection> VRRenderThread::actors
private

List of actors that will need to be added to the VR scene

◆ camera

vtkSmartPointer<vtkOpenVRCamera> VRRenderThread::camera
private

◆ 

enum { ... } VRRenderThread::Command

List of command names

◆ condition

QWaitCondition VRRenderThread::condition
private

◆ endRender

bool VRRenderThread::endRender
private

This will be set to false by the constructor, if it is set to true by the GUI then the rendering will end

◆ interactor

vtkSmartPointer<vtkOpenVRRenderWindowInteractor> VRRenderThread::interactor
private

◆ mutex

QMutex VRRenderThread::mutex
private

◆ renderer

vtkSmartPointer<vtkOpenVRRenderer> VRRenderThread::renderer
private

◆ rotateX

double VRRenderThread::rotateX
private

◆ rotateY

double VRRenderThread::rotateY
private

◆ rotateZ

double VRRenderThread::rotateZ
private

◆ t_last

std::chrono::time_point<std::chrono::steady_clock> VRRenderThread::t_last
private

A timer to help implement animations and visual effects

◆ window

vtkSmartPointer<vtkOpenVRRenderWindow> VRRenderThread::window
private

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