HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_ViewerDragger.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef HOM_ViewerDragger_h
10 #define HOM_ViewerDragger_h
11 
12 #include "HOM_API.h"
13 #include "HOM_Module.h"
14 #include "HOM_ElemPtr.h"
15 #include <UT/UT_Tuple.h>
16 
18 class HOM_Handle;
19 class HOM_Matrix3;
20 class HOM_SceneViewer;
21 class HOM_Vector3;
22 class HOM_ViewerEvent;
23 
24 SWIGOUT(%rename(ViewerDragger) HOM_ViewerDragger;)
25 
27 {
28 public:
29  typedef std::map<std::string, hboost::any> DragValueMap;
30 
32  { HOM_CONSTRUCT_OBJECT(this) }
33 
35  { HOM_DESTRUCT_OBJECT(this) }
36 
37  virtual std::string name() const = 0;
38  virtual bool valid() const = 0;
39 
40  virtual void startDrag(HOM_ViewerEvent& event, const HOM_Vector3 & start_pos) = 0;
41  virtual void startDragAcrossFloor(HOM_ViewerEvent& event, const HOM_Vector3 & start_pos) = 0;
42  virtual void startDragAlongLine(
44  const HOM_Vector3 & line_start,
45  const HOM_Vector3 & line_dir) = 0;
46  virtual void startDragAlongPlane(
48  HOM_Vector3 const& plane_point,
49  HOM_Vector3 const& plane_normal ) = 0;
50  virtual void startDragRotate(HOM_ViewerEvent& event, const HOM_Vector3 & center_pos,
51  double radius, const HOM_Vector3 & rotate_axis, const HOM_Matrix3 & orient) = 0;
52 
53  virtual DragValueMap drag(HOM_ViewerEvent & event) = 0;
54  virtual void endDrag() = 0;
55 
56  virtual HOM_Vector3 position() const = 0;
57  virtual HOM_Vector3 startPosition() const = 0;
58  virtual HOM_Vector3 startDirection() const = 0;
59  virtual HOM_Vector3 startRotatePosition() const = 0;
60 
61  virtual HOM_GeometryViewport *viewport() = 0;
62 };
63 
64 #endif // HOM_ViewerDragger_h
65 
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1238
OIIO_API bool rename(string_view from, string_view to, std::string &err)
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
GLuint const GLchar * name
Definition: glcorearb.h:785
struct _cl_event * event
Definition: glcorearb.h:2960
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1237
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
GA_API const UT_StringHolder drag
std::map< std::string, hboost::any > DragValueMap
GA_API const UT_StringHolder orient
virtual ~HOM_ViewerDragger()