9 #ifndef __HOM_GeometryViewport_h__
10 #define __HOM_GeometryViewport_h__
51 virtual void home() = 0;
53 virtual void homeAll() = 0;
54 virtual void homeSelected() = 0;
55 virtual void homeGrid() = 0;
56 virtual void homeNonTemplated() = 0;
57 virtual void homeBoundingBox(
HOM_BoundingBox *bbox,
bool center_to_origin =
false) = 0;
59 virtual void frameAll() = 0;
61 virtual void frameSelected() = 0;
62 virtual void frameGrid() = 0;
63 virtual void frameNonTemplated() = 0;
65 virtual void draw() = 0;
67 SWIGOUT(%newobject viewTransform;)
70 SWIGOUT(%newobject modelToGeometryTransform;)
71 virtual HOM_Matrix4 *modelToGeometryTransform() = 0;
72 SWIGOUT(%newobject cameraToModelTransform;)
74 SWIGOUT(%newobject ndcToCameraTransform;)
76 SWIGOUT(%newobject viewportToNDCTransform;)
78 SWIGOUT(%newobject windowToViewportTransform;)
79 virtual HOM_Matrix4 *windowToViewportTransform() = 0;
84 virtual std::vector<int> resolutionInPixels() = 0;
89 virtual void setCamera(
HOM_ObjNode &camera_node) = 0;
90 virtual void setCamera(
const char *camera_path) = 0;
91 virtual void saveViewToCamera(
HOM_ObjNode &camera_node) = 0;
93 SWIGOUT(%newobject defaultCamera;)
96 virtual void useDefaultCamera() =0;
98 virtual bool isCameraLockedToView() = 0;
99 virtual void lockCameraToView(
bool) = 0;
101 virtual bool isViewExportedToCameraContinuously() = 0;
102 virtual void exportViewToCameraContinuously(
bool) = 0;
104 virtual bool isActive2D() = 0;
105 virtual bool isActive3D() = 0;
107 virtual bool usesConstructionPlane() = 0;
109 SWIGOUT(%newobject queryNodeAtPixel;)
110 virtual HOM_Node *queryNodeAtPixel(
int x,
int y,
bool pick_templates=
false) = 0;
111 SWIGOUT(%newobject queryPrimAtPixel;)
114 virtual std::vector<HOM_ElemPtr<HOM_Node>> _queryNodesInBox(
int x,
int y,
int w,
int h,
bool pick_templates=
false) = 0;
116 virtual std::pair<int, int> _queryPrimOnDrawables(
117 const std::vector<HOM_Drawable *> &drawables,
119 bool enable_occlusion,
120 bool handle_pick_radius =
false) = 0;
122 virtual std::vector<std::pair<int, HOM_ElemPtr<HOM_Selection> > >
123 _queryComponentsOnDrawables(
124 const std::vector<HOM_Drawable *> &drawables,
126 bool enable_occlusion =
false,
127 bool contained =
false) = 0;
129 SWIGOUT(%newobject queryInspectedGeometry;)
131 SWIGOUT(%newobject queryInspectedPrim;)
132 virtual HOM_Prim *queryInspectedPrim() = 0;
135 mapToWorld(
double x,
double y) = 0;
139 virtual std::pair<int, int> mapFromMouseChop(
double x,
double y) = 0;
142 queryWorldPositionAndNormal(
int x,
int y,
144 HOM_snapSelectionMode::SnapToAll)=0;
146 virtual std::vector<int>
size() = 0;
147 virtual std::vector<int> geometry() = 0;
150 virtual void addOpaqueEventCallback(
void *callback) = 0;
152 virtual void removeOpaqueEventCallback(
void *callback) = 0;
154 virtual std::vector<void *> opaqueEventCallbacks() = 0;
156 virtual void clearOpaqueEventCallbacks() = 0;
162 void addEventCallback(InterpreterObject callback)
164 self->addOpaqueEventCallback(callback);
167 void removeEventCallback(InterpreterObject callback)
169 self->removeOpaqueEventCallback(callback);
172 void clearEventCallbacks()
174 self->clearOpaqueEventCallbacks();
177 std::vector<InterpreterObject> eventCallbacks()
179 std::vector<void *> opaque_callbacks(self->opaqueEventCallbacks());
181 std::vector<InterpreterObject> callbacks;
182 for (
int i = 0; i< opaque_callbacks.size(); ++i)
183 callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
#define HOM_DESTRUCT_OBJECT(pointer)
GLsizei const GLchar *const * string
string __repr__(VtArray< T > const &self)
std::tuple< Types...> UT_Tuple
void ignore(T const &) VULKAN_HPP_NOEXCEPT
#define HOM_CONSTRUCT_OBJECT(pointer)
GLuint const GLchar * name
virtual ~HOM_GeometryViewport()
GLfloat GLfloat GLfloat GLfloat h
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
HOM_GeometryViewport(const HOM_GeometryViewport &)
GLubyte GLubyte GLubyte GLubyte w