vtkOpenVRHardwarePicker.h 1.85 KB
Newer Older
Ken Martin's avatar
Ken Martin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
/*=========================================================================

Program:   Visualization Toolkit
Module:    vtkOpemVRHardwarePicker.h

Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
/**
* @class   vtkOpenVRHardwarePicker
* @brief   pick an actor/prop given a controller position and orientation
*
* vtkOpenVRHardwarePicker is used to pick an actor/prop along a ray.
* This version uses a hardware selector to do the picking.
*
* @sa
* vtkProp3DPicker vtkOpenVRInteractorStylePointer
*/

#ifndef vtkOpenVRHardwarePicker_h
#define vtkOpenVRHardwarePicker_h

29
#include "vtkPropPicker.h"
Ken Martin's avatar
Ken Martin committed
30 31 32 33
#include "vtkRenderingOpenVRModule.h" // For export macro

class vtkSelection;

34
class VTKRENDERINGOPENVR_EXPORT vtkOpenVRHardwarePicker : public vtkPropPicker
Ken Martin's avatar
Ken Martin committed
35 36 37 38
{
public:
  static vtkOpenVRHardwarePicker *New();

39
  vtkTypeMacro(vtkOpenVRHardwarePicker, vtkPropPicker);
Ken Martin's avatar
Ken Martin committed
40

41
  void PrintSelf(ostream& os, vtkIndent indent) override;
Ken Martin's avatar
Ken Martin committed
42 43 44 45 46 47 48 49 50 51 52 53

  /**
  * Perform a pick from the user-provided list of vtkProps.
  */
  virtual int PickProp(double selectionPt[3], double eventWorldOrientation[4],
    vtkRenderer *renderer, vtkPropCollection* pickfrom);

  vtkSelection *GetSelection() {
    return this->Selection; }

protected:
  vtkOpenVRHardwarePicker();
54
  ~vtkOpenVRHardwarePicker() override;
Ken Martin's avatar
Ken Martin committed
55

56
  void Initialize() override;
Ken Martin's avatar
Ken Martin committed
57 58 59
  vtkSelection *Selection;

private:
60 61
  vtkOpenVRHardwarePicker(const vtkOpenVRHardwarePicker&) = delete;// Not implemented.
  void operator=(const vtkOpenVRHardwarePicker&) = delete;// Not implemented.
Ken Martin's avatar
Ken Martin committed
62 63 64
};

#endif