VTK  9.6.20260328
vtkWebXRUtilities.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
9
10#ifndef vtkWebXRUtilities_h
11#define vtkWebXRUtilities_h
12
13#include "vtkEventData.h"
14#include "vtkMatrix4x4.h"
15#include "vtkWebXR.h"
16
17VTK_ABI_NAMESPACE_BEGIN
19{
20
21//----------------------------------------------------------------------------
22// transpose of VTK standard
23inline void SetMatrixFromWebXRMatrix(vtkMatrix4x4* result, const double* webXRMatrix)
24{
25 result->SetData(webXRMatrix);
26 result->Transpose();
27 result->Modified();
28}
29
30//------------------------------------------------------------------------------
64
65//------------------------------------------------------------------------------
67{
68 switch (hand)
69 {
71 {
73 }
75 {
77 }
79 default:
80 {
82 }
83 }
84}
85
86} // namespace vtkWebXRUtilities
87
88VTK_ABI_NAMESPACE_END
89#endif
90// VTK-HeaderTest-Exclude: vtkWebXRUtilities.h
represent and manipulate 4x4 transformation matrices
void SetData(const double data[16])
Copies data into the matrix.
static void Transpose(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Transpose the matrix and put it into out.
virtual void Modified()
Update the modification time for this object.
vtkEventDataDevice GetDeviceFromWebXRHand(WebXRHandedness hand)
void SetMatrixFromWebXRMatrix(vtkMatrix4x4 *result, const double *webXRMatrix)
vtkEventDataDeviceInput GetInputFromWebXRButton(WebXRGamepadButtonMapping button)
vtkEventDataDevice
platform-independent event data structures
vtkEventDataDeviceInput
Minimal WebXR Device API wrapper.
WebXRGamepadButtonMapping
Definition vtkWebXR.h:115
@ WEBXR_BUTTON_4
Definition vtkWebXR.h:123
@ WEBXR_BUTTON_PRIMARY_TRIGGER
Definition vtkWebXR.h:116
@ WEBXR_BUTTON_PRIMARY_TOUCHPAD
Definition vtkWebXR.h:118
@ WEBXR_BUTTON_3
Definition vtkWebXR.h:122
@ WEBXR_BUTTON_2
Definition vtkWebXR.h:121
@ WEBXR_BUTTON_PRIMARY_SQUEEZE
Definition vtkWebXR.h:117
@ WEBXR_BUTTON_PRIMARY_THUMBSTICK
Definition vtkWebXR.h:119
@ WEBXR_BUTTON_1
Definition vtkWebXR.h:120
WebXRHandedness
WebXR handedness.
Definition vtkWebXR.h:45
@ WEBXR_HANDEDNESS_LEFT
Definition vtkWebXR.h:47
@ WEBXR_HANDEDNESS_RIGHT
Definition vtkWebXR.h:48
@ WEBXR_HANDEDNESS_NONE
Definition vtkWebXR.h:46