Blender
V4.3
source
blender
blenlib
BLI_boxpack_2d.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
11
#ifdef __cplusplus
12
extern
"C"
{
13
#endif
14
15
struct
ListBase
;
16
17
/* Box Packer */
18
19
typedef
struct
BoxPack
{
20
float
x
;
21
float
y
;
22
float
w
;
23
float
h
;
24
25
/* Verts this box uses
26
* (BL,TR,TL,BR) / 0,1,2,3 */
27
struct
BoxVert
*
v
[4];
28
29
int
index
;
30
}
BoxPack
;
31
47
void
BLI_box_pack_2d
(
48
BoxPack
*boxarray,
unsigned
int
len
,
bool
sort_boxes,
float
*r_tot_x,
float
*r_tot_y);
49
50
typedef
struct
FixedSizeBoxPack
{
51
struct
FixedSizeBoxPack
*
next
, *
prev
;
52
int
x
,
y
;
53
int
w
,
h
;
54
}
FixedSizeBoxPack
;
55
71
void
BLI_box_pack_2d_fixedarea
(
struct
ListBase
*boxes,
72
int
width,
73
int
height,
74
struct
ListBase
*packed);
75
76
#ifdef __cplusplus
77
}
78
#endif
BLI_box_pack_2d_fixedarea
void BLI_box_pack_2d_fixedarea(struct ListBase *boxes, int width, int height, struct ListBase *packed)
Definition
boxpack_2d.c:663
FixedSizeBoxPack
struct FixedSizeBoxPack FixedSizeBoxPack
BLI_box_pack_2d
void BLI_box_pack_2d(BoxPack *boxarray, unsigned int len, bool sort_boxes, float *r_tot_x, float *r_tot_y)
Definition
boxpack_2d.c:271
BoxPack
struct BoxPack BoxPack
len
int len
Definition
draw_manager_c.cc:115
BoxPack
Definition
BLI_boxpack_2d.h:19
BoxPack::v
struct BoxVert * v[4]
Definition
BLI_boxpack_2d.h:27
BoxPack::x
float x
Definition
BLI_boxpack_2d.h:20
BoxPack::h
float h
Definition
BLI_boxpack_2d.h:23
BoxPack::w
float w
Definition
BLI_boxpack_2d.h:22
BoxPack::index
int index
Definition
BLI_boxpack_2d.h:29
BoxPack::y
float y
Definition
BLI_boxpack_2d.h:21
BoxVert
Definition
boxpack_2d.c:37
FixedSizeBoxPack
Definition
BLI_boxpack_2d.h:50
FixedSizeBoxPack::h
int h
Definition
BLI_boxpack_2d.h:53
FixedSizeBoxPack::next
struct FixedSizeBoxPack * next
Definition
BLI_boxpack_2d.h:51
FixedSizeBoxPack::prev
struct FixedSizeBoxPack * prev
Definition
BLI_boxpack_2d.h:51
FixedSizeBoxPack::x
int x
Definition
BLI_boxpack_2d.h:52
FixedSizeBoxPack::w
int w
Definition
BLI_boxpack_2d.h:53
FixedSizeBoxPack::y
int y
Definition
BLI_boxpack_2d.h:52
ListBase
Definition
DNA_listBase.h:32
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0