Welcome to mirror list, hosted at ThFree Co, Russian Federation.

GeoCommon.h « intern « dualcon « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 70dd52a6870921455cb482be57f5b77f67976ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* SPDX-License-Identifier: GPL-2.0-or-later */

#ifndef __GEOCOMMON_H__
#define __GEOCOMMON_H__

#define UCHAR unsigned char
#define USHORT unsigned short

#define USE_MINIMIZER

/**
 * Structure definitions for points and triangles.
 *
 * @author Tao Ju
 */

// 3d point with integer coordinates
typedef struct {
  int x, y, z;
} Point3i;

typedef struct {
  Point3i begin;
  Point3i end;
} BoundingBox;

// triangle that points to three vertices
typedef struct {
  float vt[3][3];
} Triangle;

// 3d point with float coordinates
typedef struct {
  float x, y, z;
} Point3f;

typedef struct {
  Point3f begin;
  Point3f end;
} BoundingBoxf;

#endif /* __GEOCOMMON_H__ */