Blender
V5.0
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
10
11
#include <stdbool.h>
12
13
struct
ListBase
;
14
15
/* Box Packer */
16
17
typedef
struct
BoxPack
{
18
float
x
;
19
float
y
;
20
float
w
;
21
float
h
;
22
23
/* Verts this box uses
24
* (BL,TR,TL,BR) / 0,1,2,3 */
25
struct
BoxVert
*
v
[4];
26
27
int
index
;
28
}
BoxPack
;
29
45
void
BLI_box_pack_2d
(
46
BoxPack
*boxarray,
unsigned
int
len
,
bool
sort_boxes,
float
*r_tot_x,
float
*r_tot_y);
47
48
typedef
struct
FixedSizeBoxPack
{
49
struct
FixedSizeBoxPack
*
next
, *
prev
;
50
int
x
,
y
;
51
int
w
,
h
;
52
}
FixedSizeBoxPack
;
53
69
void
BLI_box_pack_2d_fixedarea
(
struct
ListBase
*boxes,
70
int
width,
71
int
height,
72
struct
ListBase
*
packed
);
BLI_box_pack_2d_fixedarea
void BLI_box_pack_2d_fixedarea(struct ListBase *boxes, int width, int height, struct ListBase *packed)
Definition
boxpack_2d.cc:649
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.cc:257
packed
#define packed
Definition
gpu_shader_compat_cxx.hh:153
BoxPack
Definition
BLI_boxpack_2d.h:17
BoxPack::v
struct BoxVert * v[4]
Definition
BLI_boxpack_2d.h:25
BoxPack::x
float x
Definition
BLI_boxpack_2d.h:18
BoxPack::h
float h
Definition
BLI_boxpack_2d.h:21
BoxPack::w
float w
Definition
BLI_boxpack_2d.h:20
BoxPack::index
int index
Definition
BLI_boxpack_2d.h:27
BoxPack::y
float y
Definition
BLI_boxpack_2d.h:19
BoxVert
Definition
boxpack_2d.cc:34
FixedSizeBoxPack
Definition
BLI_boxpack_2d.h:48
FixedSizeBoxPack::h
int h
Definition
BLI_boxpack_2d.h:51
FixedSizeBoxPack::next
struct FixedSizeBoxPack * next
Definition
BLI_boxpack_2d.h:49
FixedSizeBoxPack::prev
struct FixedSizeBoxPack * prev
Definition
BLI_boxpack_2d.h:49
FixedSizeBoxPack::x
int x
Definition
BLI_boxpack_2d.h:50
FixedSizeBoxPack::w
int w
Definition
BLI_boxpack_2d.h:51
FixedSizeBoxPack::y
int y
Definition
BLI_boxpack_2d.h:50
ListBase
Definition
DNA_listBase.h:32
len
uint len
Definition
uvedit_unwrap_ops.cc:2126
Generated on
for Blender by
doxygen
1.16.1