~ubuntu-branches/ubuntu/intrepid/blender/intrepid-updates

« back to all changes in this revision

Viewing changes to source/blender/blenlib/BLI_boxpack2d.h

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-08-08 02:45:40 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080808024540-kkjp7ekfivzhuw3l
Tags: 2.46+dfsg-4
* Fix python syntax warning in import_dxf.py, which led to nasty output
  in installation/upgrade logs during byte-compilation, using a patch
  provided by the script author (Closes: #492280):
   - debian/patches/45_fix_python_syntax_warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * 
 
3
 *
 
4
 * ***** BEGIN GPL LICENSE BLOCK *****
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU General Public License
 
8
 * as published by the Free Software Foundation; either version 2
 
9
 * of the License, or (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software Foundation,
 
18
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
19
 *
 
20
 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
 
21
 * All rights reserved.
 
22
 *
 
23
 * The Original Code is: all of this file.
 
24
 *
 
25
 * Contributor(s): Campbell Barton
 
26
 *
 
27
 * ***** END GPL LICENSE BLOCK *****
 
28
 */
 
29
 
 
30
/* Box Packer */
 
31
 
 
32
/* verts, internal use only */
 
33
typedef struct boxVert {
 
34
        float x;
 
35
        float y;
 
36
        short free;
 
37
        
 
38
        struct boxPack *trb; /* top right box */
 
39
        struct boxPack *blb; /* bottom left box */
 
40
        struct boxPack *brb; /* bottom right box */
 
41
        struct boxPack *tlb; /* top left box */
 
42
        
 
43
        /* Store last intersecting boxes here
 
44
         * speedup intersection testing */
 
45
        struct boxPack *isect_cache[4];
 
46
        
 
47
        int index;
 
48
} boxVert;
 
49
 
 
50
typedef struct boxPack {
 
51
        float x;
 
52
        float y;
 
53
        float w;
 
54
        float h;
 
55
        int index;
 
56
        
 
57
        /* Verts this box uses
 
58
         * (BL,TR,TL,BR) / 0,1,2,3 */
 
59
        boxVert *v[4];
 
60
} boxPack;
 
61
 
 
62
void boxPack2D(boxPack *boxarray, int len, float *tot_width, float *tot_height); 
 
63