Blender V5.3
BLI_boxpack_2d.hh
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 "DNA_listBase.h"
12
13namespace blender {
14
15/* Box Packer */
16
17struct 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};
29
46 BoxPack *boxarray, unsigned int len, bool sort_boxes, float *r_tot_x, float *r_tot_y);
47
50 int x, y;
51 int w, h;
52};
53
69void BLI_box_pack_2d_fixedarea(ListBaseT<FixedSizeBoxPack> *boxes,
70 int width,
71 int height,
72 ListBaseT<FixedSizeBoxPack> *packed);
73
74} // namespace blender
These structs are the foundation for all linked lists in the library system.
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Definition math_dual.h:263
BMesh Iterators.
void BLI_box_pack_2d_fixedarea(ListBaseT< FixedSizeBoxPack > *boxes, int width, int height, ListBaseT< FixedSizeBoxPack > *packed)
void BLI_box_pack_2d(BoxPack *boxarray, unsigned int len, bool sort_boxes, float *r_tot_x, float *r_tot_y)
struct BoxVert * v[4]
struct FixedSizeBoxPack * prev
struct FixedSizeBoxPack * next