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 
66  double fov;
67 
68  double height;
70 
71  void* reserved;
72 
73 };
74 
79 typedef void (*SUOverlayBeginFrameFuncT)(SUOverlayRef, const struct SUBeginFrameInfo*, void*);
80 
86 
91 #define SUOVERLAY_DRAW_FRAME_INFO_VERSION (SUOVERLAY_DRAW_FRAME_INFO_VERSION_1)
92 
100  void* ptr;
102  uint32_t row_pitch;
104  uint32_t size;
105 };
106 
111 enum SUOverlayImageFormat : uint8_t {
114 };
115 
123 };
124 
134  enum SUOverlayDrawFrameInfoVersion version;
135 
139 
143 
147 
149  void* reserved;
150 };
151 
156 typedef void (*SUOverlayDrawFrameFuncT)(SUOverlayRef, struct SUOverlayDrawFrameInfo*, void*);
157 
164 typedef void (*SUOverlayEndFrameFuncT)(SUOverlayRef, void*);
165 
170 typedef void (*SUOverlayStartFuncT)(SUOverlayRef, void*);
171 
176 typedef void (*SUOverlayStopFuncT)(SUOverlayRef, void*);
177 
182 enum SUOverlayCreateInfoVersion : uint32_t {
184 };
185 
190 #define SUOVERLAY_CREATE_INFO_VERSION (SUOVERLAY_CREATE_INFO_VERSION_1)
191 
199  enum SUOverlayCreateInfoVersion version;
200 
203  void* user_data;
204 
206  const char* id;
208  const char* name;
210  const char* desc;
212  const char* source;
213 
215  enum SUOverlayImageFormat image_format;
217  enum SUOverlayImageOrientation image_orientation;
218 
220  SUOverlayStartFuncT start;
222  SUOverlayStopFuncT stop;
224  SUOverlayGetExtentsFuncT get_extents;
225 
227  SUOverlayBeginFrameFuncT begin_frame;
229  SUOverlayDrawFrameFuncT draw_frame;
234  SUOverlayEndFrameFuncT end_frame;
235 };
236 
247 SU_RESULT SUOverlayEnable(SUOverlayRef overlay, bool enabled);
248 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #pragma pack(pop)
254 
255 #endif // SKETCHUP_APPLICATION_OVERLAY_H_