LayOut C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
overlay.h
Go to the documentation of this file.
1 // Copyright 2023 Trimble Inc. All Rights Reserved.
2 
7 #ifndef SKETCHUP_APPLICATION_OVERLAY_H_
8 #define SKETCHUP_APPLICATION_OVERLAY_H_
9 
10 #include <SketchUpAPI/model/defs.h>
11 #include <SketchUpAPI/geometry.h>
12 
13 #pragma pack(push, 8)
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
30 
37 };
38 
43 #define SUOVERLAY_BEGIN_FRAME_INFO_VERSION (SUOVERLAY_BEGIN_FRAME_INFO_VERSION_1)
44 
53  enum SUOverlayBeginFrameInfoVersion version;
54 
56  struct SUPoint3D target;
57  struct SUVector3D up;
58  double aspect_ratio;
61  double projection_matrix[16];
62  double view_matrix[16];
63  double viewport_width;
64  double viewport_height;
65 
70  double fov;
71 
72  double height;
74 
79  void* reserved;
80 };
81 
86 typedef void (*SUOverlayBeginFrameFuncT)(SUOverlayRef, const struct SUBeginFrameInfo*, void*);
87 
93 
98 #define SUOVERLAY_DRAW_FRAME_INFO_VERSION (SUOVERLAY_DRAW_FRAME_INFO_VERSION_1)
99 
107  void* ptr;
109  uint32_t row_pitch;
111  uint32_t size;
112 };
113 
118 enum SUOverlayImageFormat : uint8_t {
121 };
122 
130 };
131 
141  enum SUOverlayDrawFrameInfoVersion version;
142 
146 
150 
154 
156  void* reserved;
157 };
158 
163 typedef void (*SUOverlayDrawFrameFuncT)(SUOverlayRef, struct SUOverlayDrawFrameInfo*, void*);
164 
171 typedef void (*SUOverlayEndFrameFuncT)(SUOverlayRef, void*);
172 
177 typedef void (*SUOverlayStartFuncT)(SUOverlayRef, void*);
178 
183 typedef void (*SUOverlayStopFuncT)(SUOverlayRef, void*);
184 
189 enum SUOverlayCreateInfoVersion : uint32_t {
191 };
192 
197 #define SUOVERLAY_CREATE_INFO_VERSION (SUOVERLAY_CREATE_INFO_VERSION_1)
198 
206  enum SUOverlayCreateInfoVersion version;
207 
210  void* user_data;
211 
213  const char* id;
215  const char* name;
217  const char* desc;
219  const char* source;
220 
222  enum SUOverlayImageFormat image_format;
224  enum SUOverlayImageOrientation image_orientation;
225 
227  SUOverlayStartFuncT start;
229  SUOverlayStopFuncT stop;
231  SUOverlayGetExtentsFuncT get_extents;
232 
234  SUOverlayBeginFrameFuncT begin_frame;
236  SUOverlayDrawFrameFuncT draw_frame;
241  SUOverlayEndFrameFuncT end_frame;
242 };
243 
254 SU_RESULT SUOverlayEnable(SUOverlayRef overlay, bool enabled);
255 
256 #ifdef __cplusplus
257 }
258 #endif
259 
260 #pragma pack(pop)
261 
262 #endif // SKETCHUP_APPLICATION_OVERLAY_H_