LayOut C API
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
SketchUpAPI
application
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
29
typedef
struct
SUBoundingBox3D
(*
SUOverlayGetExtentsFuncT
)(
SUOverlayRef
,
void
*);
30
35
enum
SUOverlayBeginFrameInfoVersion
: uint32_t {
36
SUOVERLAY_BEGIN_FRAME_INFO_VERSION_1
= 1,
37
};
38
43
#define SUOVERLAY_BEGIN_FRAME_INFO_VERSION (SUOVERLAY_BEGIN_FRAME_INFO_VERSION_1)
44
51
struct
SUBeginFrameInfo
{
53
enum
SUOverlayBeginFrameInfoVersion
version
;
54
55
struct
SUPoint3D
position
;
56
struct
SUPoint3D
target
;
57
struct
SUVector3D
up
;
58
double
aspect_ratio
;
59
double
near_clipping_distance
;
60
double
far_clipping_distance
;
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
;
73
bool
is_perspective
;
74
79
void
*
reserved
;
80
};
81
86
typedef
void (*
SUOverlayBeginFrameFuncT
)(
SUOverlayRef
,
const
struct
SUBeginFrameInfo
*,
void
*);
87
92
enum
SUOverlayDrawFrameInfoVersion
: uint32_t {
SUOVERLAY_DRAW_FRAME_INFO_VERSION_1
= 1 };
93
98
#define SUOVERLAY_DRAW_FRAME_INFO_VERSION (SUOVERLAY_DRAW_FRAME_INFO_VERSION_1)
99
105
struct
SUDrawFrameMemoryBuffer
{
107
void
*
ptr
;
109
uint32_t
row_pitch
;
111
uint32_t
size
;
112
};
113
118
enum
SUOverlayImageFormat
: uint8_t {
119
SUOVERLAY_IMAGE_FORMAT_RGBA
= 0,
120
SUOVERLAY_IMAGE_FORMAT_BGRA
= 1,
121
};
122
127
enum
SUOverlayImageOrientation
: uint8_t {
128
SUOVERLAY_IMAGE_ORIENTATION_TOP_DOWN
= 0,
129
SUOVERLAY_IMAGE_ORIENTATION_BOTTOM_UP
= 1,
130
};
131
139
struct
SUOverlayDrawFrameInfo
{
141
enum
SUOverlayDrawFrameInfoVersion
version
;
142
145
double
blending_factor
;
146
149
struct
SUDrawFrameMemoryBuffer
color
;
150
153
struct
SUDrawFrameMemoryBuffer
depth
;
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 {
190
SUOVERLAY_CREATE_INFO_VERSION_1
= 1,
191
};
192
197
#define SUOVERLAY_CREATE_INFO_VERSION (SUOVERLAY_CREATE_INFO_VERSION_1)
198
204
struct
SUOverlayCreateInfo
{
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_
Generated on Mon Sep 29 2025 16:14:33 for LayOut C API by
1.8.3.1