libkipr  1.0.0
geometry.h
Go to the documentation of this file.
1 #ifndef _KIPR_GEOMETRY_GEOMETRY_H_
2 #define _KIPR_GEOMETRY_GEOMETRY_H_
3 
4 #include "kipr/export/export.h"
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
14 typedef struct point2
15 {
16  int x;
17  int y;
19 
24 typedef struct point3
25 {
26  int x;
27  int y;
28  int z;
30 
35 typedef struct rectangle
36 {
37  int ulx;
38  int uly;
39  int width;
40  int height;
42 
52 
62 EXPORT_SYM point3 create_point3(int x, int y, int z);
63 
74 EXPORT_SYM rectangle create_rectangle(int ulx, int uly, int width, int height);
75 
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 
82 #endif /* INCLUDE_WALLABY_GEOM_H_ */
#define EXPORT_SYM
Definition: export.h:7
EXPORT_SYM rectangle create_rectangle(int ulx, int uly, int width, int height)
Create a rectangle object.
struct point3 point3
A 3D point; has x, y, and z.
struct point2 point2
A 2D point; has x and y.
EXPORT_SYM point3 create_point3(int x, int y, int z)
Create a point3 object.
struct rectangle rectangle
A rectangle object.
EXPORT_SYM point2 create_point2(int x, int y)
Create a point2 object.
A 2D point; has x and y.
Definition: geometry.h:15
int y
the y value of the point
Definition: geometry.h:17
int x
the x value of the point
Definition: geometry.h:16
A 3D point; has x, y, and z.
Definition: geometry.h:25
int z
the z value of the point
Definition: geometry.h:28
int x
the x value of the point
Definition: geometry.h:26
int y
the y value of the point
Definition: geometry.h:27
A rectangle object.
Definition: geometry.h:36
int ulx
the x value of the rectangle's upper left
Definition: geometry.h:37
int width
the width of the rectangle
Definition: geometry.h:39
int uly
the y value of the rectangle's upper left
Definition: geometry.h:38
int height
the height of the rectangle
Definition: geometry.h:40