Github User Fetcher
1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
graphene-types.h
Go to the documentation of this file.
1
/* graphene-types.h: Shared types
2
*
3
* SPDX-License-Identifier: MIT
4
*
5
* Copyright 2014 Emmanuele Bassi
6
*
7
* Permission is hereby granted, free of charge, to any person obtaining a copy
8
* of this software and associated documentation files (the "Software"), to deal
9
* in the Software without restriction, including without limitation the rights
10
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
* copies of the Software, and to permit persons to whom the Software is
12
* furnished to do so, subject to the following conditions:
13
*
14
* The above copyright notice and this permission notice shall be included in
15
* all copies or substantial portions of the Software.
16
*
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
* THE SOFTWARE.
24
*/
25
26
#pragma once
27
28
#if !defined(GRAPHENE_H_INSIDE) && !defined(GRAPHENE_COMPILATION)
29
#error "Only graphene.h can be included directly."
30
#endif
31
32
#include "
graphene-config.h
"
33
#include "
graphene-macros.h
"
34
#include "
graphene-version-macros.h
"
35
36
GRAPHENE_BEGIN_DECLS
37
38
/**
39
* GRAPHENE_VEC2_LEN:
40
*
41
* Evaluates to the number of components of a #graphene_vec2_t.
42
*
43
* This symbol is useful when declaring a C array of floating
44
* point values to be used with graphene_vec2_init_from_float() and
45
* graphene_vec2_to_float(), e.g.
46
*
47
* |[
48
* float v[GRAPHENE_VEC2_LEN];
49
*
50
* // vec is defined elsewhere
51
* graphene_vec2_to_float (&vec, v);
52
*
53
* for (int i = 0; i < GRAPHENE_VEC2_LEN; i++)
54
* fprintf (stdout, "component %d: %g\n", i, v[i]);
55
* ]|
56
*
57
* Since: 1.0
58
*/
59
#define GRAPHENE_VEC2_LEN 2
60
61
/**
62
* GRAPHENE_VEC3_LEN:
63
*
64
* Evaluates to the number of components of a #graphene_vec3_t.
65
*
66
* This symbol is useful when declaring a C array of floating
67
* point values to be used with graphene_vec3_init_from_float() and
68
* graphene_vec3_to_float(), e.g.
69
*
70
* |[
71
* float v[GRAPHENE_VEC3_LEN];
72
*
73
* // vec is defined elsewhere
74
* graphene_vec3_to_float (&vec, v);
75
*
76
* for (int i = 0; i < GRAPHENE_VEC2_LEN; i++)
77
* fprintf (stdout, "component %d: %g\n", i, v[i]);
78
* ]|
79
*
80
* Since: 1.0
81
*/
82
#define GRAPHENE_VEC3_LEN 3
83
84
/**
85
* GRAPHENE_VEC4_LEN:
86
*
87
* Evaluates to the number of components of a #graphene_vec4_t.
88
*
89
* This symbol is useful when declaring a C array of floating
90
* point values to be used with graphene_vec4_init_from_float() and
91
* graphene_vec4_to_float(), e.g.
92
*
93
* |[
94
* float v[GRAPHENE_VEC4_LEN];
95
*
96
* // vec is defined elsewhere
97
* graphene_vec4_to_float (&vec, v);
98
*
99
* for (int i = 0; i < GRAPHENE_VEC4_LEN; i++)
100
* fprintf (stdout, "component %d: %g\n", i, v[i]);
101
* ]|
102
*
103
* Since: 1.0
104
*/
105
#define GRAPHENE_VEC4_LEN 4
106
107
typedef
struct
_graphene_vec2_t
graphene_vec2_t
;
108
typedef
struct
_graphene_vec3_t
graphene_vec3_t
;
109
typedef
struct
_graphene_vec4_t
graphene_vec4_t
;
110
111
typedef
struct
_graphene_matrix_t
graphene_matrix_t
;
112
113
typedef
struct
_graphene_point_t
graphene_point_t
;
114
typedef
struct
_graphene_size_t
graphene_size_t
;
115
typedef
struct
_graphene_rect_t
graphene_rect_t
;
116
117
typedef
struct
_graphene_point3d_t
graphene_point3d_t
;
118
typedef
struct
_graphene_quad_t
graphene_quad_t
;
119
typedef
struct
_graphene_quaternion_t
graphene_quaternion_t
;
120
typedef
struct
_graphene_euler_t
graphene_euler_t
;
121
122
typedef
struct
_graphene_plane_t
graphene_plane_t
;
123
typedef
struct
_graphene_frustum_t
graphene_frustum_t
;
124
typedef
struct
_graphene_sphere_t
graphene_sphere_t
;
125
typedef
struct
_graphene_box_t
graphene_box_t
;
126
typedef
struct
_graphene_triangle_t
graphene_triangle_t
;
127
typedef
struct
_graphene_ray_t
graphene_ray_t
;
128
129
GRAPHENE_END_DECLS
graphene-config.h
graphene-macros.h
GRAPHENE_END_DECLS
#define GRAPHENE_END_DECLS
Definition
graphene-macros.h:75
GRAPHENE_BEGIN_DECLS
#define GRAPHENE_BEGIN_DECLS
Definition
graphene-macros.h:74
graphene-version-macros.h
_graphene_box_t
Definition
graphene-box.h:46
_graphene_euler_t
Definition
graphene-euler.h:136
_graphene_frustum_t
Definition
graphene-frustum.h:48
_graphene_matrix_t
Definition
graphene-matrix.h:41
_graphene_plane_t
Definition
graphene-plane.h:48
_graphene_point3d_t
Definition
graphene-point3d.h:68
_graphene_point_t
Definition
graphene-point.h:71
_graphene_quad_t
Definition
graphene-quad.h:44
_graphene_quaternion_t
Definition
graphene-quaternion.h:48
_graphene_ray_t
Definition
graphene-ray.h:48
_graphene_rect_t
Definition
graphene-rect.h:84
_graphene_size_t
Definition
graphene-size.h:71
_graphene_sphere_t
Definition
graphene-sphere.h:45
_graphene_triangle_t
Definition
graphene-triangle.h:45
_graphene_vec2_t
Definition
graphene-vec2.h:45
_graphene_vec3_t
Definition
graphene-vec3.h:45
_graphene_vec4_t
Definition
graphene-vec4.h:43
nix
store
z8bykf5nzmfh6jq23a5kd86xjdk0s0x6-graphene-1.10.8-dev
include
graphene-1.0
graphene-types.h
Generated by
1.10.0