25#ifndef vtkOpenXRRenderWindowInteractor_h
26#define vtkOpenXRRenderWindowInteractor_h
28#include "vtkRenderingOpenXRModule.h"
80 bool ApplyVibration(
const std::string& actionName,
const int hand,
const float amplitude = 0.5f,
81 const float duration = 25000000.0f,
const float frequency = XR_FREQUENCY_UNSPECIFIED);
124 bool UseFunction =
false;
a simple class to control print indentation
Allocate and hold a VTK object.
implements OpenXR specific functions required by vtkRenderWindowInteractor.
XrPosef * GetHandPose(const uint32_t hand)
Return the XrPosef for the action named "handpose" and the hand hand or return nullptr if "handpose" ...
void HandleBooleanAction(const ActionData &actionData, const int hand, vtkEventDataDevice3D *ed)
void ProcessXrEvents()
Process OpenXR specific events.
void DoOneEvent(vtkVRRenderWindow *renWin, vtkRenderer *ren) override
Implements the event loop.
void HandleAction(const ActionData &actionData, const int hand, vtkEventDataDevice3D *ed)
void AddAction(const std::string &path, const std::function< void(vtkEventData *)> &)
bool ApplyVibration(const std::string &actionName, const int hand, const float amplitude=0.5f, const float duration=25000000.0f, const float frequency=XR_FREQUENCY_UNSPECIFIED)
Apply haptic vibration using the provided action action to emit vibration on hand to emit on amplitud...
vtkNew< vtkMatrix4x4 > PoseToWorldMatrix
void AddAction(const std::string &path, const vtkCommand::EventIds &)
Assign an event or std::function to an event path.
ActionData * GetActionDataFromName(const std::string &actionName)
bool LoadDefaultBinding(const std::string &bindingFilename)
XrActionType GetActionTypeFromString(const std::string &type)
void ApplyAction(const ActionData &actionData, vtkEventDataDevice3D *ed)
void PollXrActions()
Update tha action states using the OpenXRManager and handle all actions.
std::map< std::string, ActionData * > MapAction
~vtkOpenXRRenderWindowInteractor() override
MapAction MapActionStruct_Name
void HandlePoseAction(const ActionData &actionData, const int hand, vtkEventDataDevice3D *ed)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void ConvertOpenXRPoseToWorldCoordinates(const XrPosef &xrPose, double pos[3], double wxyz[4], double ppos[3], double wdir[3])
void HandleVector2fAction(const ActionData &actionData, const int hand, vtkEventDataDevice3D *ed)
static vtkOpenXRRenderWindowInteractor * New()
void Initialize() override
Initialize the event handler.
bool LoadActions(const std::string &actionFilename)
vtkOpenXRRenderWindowInteractor()
abstract specification for renderers
Implements VR specific functions required by vtkRenderWindowInteractor.
std::function< void(vtkEventData *) Function)
vtkCommand::EventIds EventId
vtkOpenXRManager::Action_t Action_t