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
66
double
fov
;
67
68
double
height
;
69
bool
is_perspective
;
70
71
void
*
reserved
;
72
73
};
74
79
typedef
void (*
SUOverlayBeginFrameFuncT
)(
SUOverlayRef
,
const
struct
SUBeginFrameInfo
*,
void
*);
80
85
enum
SUOverlayDrawFrameInfoVersion
: uint32_t {
SUOVERLAY_DRAW_FRAME_INFO_VERSION_1
= 1 };
86
91
#define SUOVERLAY_DRAW_FRAME_INFO_VERSION (SUOVERLAY_DRAW_FRAME_INFO_VERSION_1)
92
98
struct
SUDrawFrameMemoryBuffer
{
100
void
*
ptr
;
102
uint32_t
row_pitch
;
104
uint32_t
size
;
105
};
106
111
enum
SUOverlayImageFormat
: uint8_t {
112
SUOVERLAY_IMAGE_FORMAT_RGBA
= 0,
113
SUOVERLAY_IMAGE_FORMAT_BGRA
= 1,
114
};
115
120
enum
SUOverlayImageOrientation
: uint8_t {
121
SUOVERLAY_IMAGE_ORIENTATION_TOP_DOWN
= 0,
122
SUOVERLAY_IMAGE_ORIENTATION_BOTTOM_UP
= 1,
123
};
124
132
struct
SUOverlayDrawFrameInfo
{
134
enum
SUOverlayDrawFrameInfoVersion
version
;
135
138
double
blending_factor
;
139
142
struct
SUDrawFrameMemoryBuffer
color
;
143
146
struct
SUDrawFrameMemoryBuffer
depth
;
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 {
183
SUOVERLAY_CREATE_INFO_VERSION_1
= 1,
184
};
185
190
#define SUOVERLAY_CREATE_INFO_VERSION (SUOVERLAY_CREATE_INFO_VERSION_1)
191
197
struct
SUOverlayCreateInfo
{
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_
Generated on Wed Apr 9 2025 09:27:46 for LayOut C API by
1.8.3.1