FiberBundleHDF5  FiberHDF5 Documentation, Revision 2026
High-Performance Fiber Bundle Data Model for Scientific Visualization
Loading...
Searching...
No Matches
F5coordinates.h
Go to the documentation of this file.
1
2#ifndef __F5Bcoordinates_H
3#define __F5Bcoordinates_H
4
5#include "F5types.h"
6#include "F5Bchart.h"
7
8#include "F5WinDLLApi.h"
9
10#ifdef __cplusplus
11extern "C"
12{
13#endif
14
15/**\defgroup coords Predefined Coordinate Systems and Standard Charts
16*/
17
18/************* 4D charts ************************/
19
22
23typedef struct { F5_float_t t,x,y,z; } F5_vec4f_t;
24typedef struct { F5_double_t t,x,y,z; } F5_vec4d_t;
25
26typedef struct { F5_float_t t,x,y,z; } F5_point4f_t;
27typedef struct { F5_double_t t,x,y,z; } F5_point4d_t;
28
31
32
33/**
34 Symmetric 4x4 tensor in cartesian coordinates.
35 \note Corresponding HDF5 type is F5T_METRIC44_FLOAT
36 */
37typedef struct { F5_float_t gtt, gtx, gxx, gty, gxy, gyy, gtz, gxz, gyz, gzz; } F5_metric4f_t;
38typedef struct { F5_double_t gtt, gtx, gxx, gty, gxy, gyy, gtz, gxz, gyz, gzz; } F5_metric4d_t;
39
40#define F5T_COORD4_FLOAT F5B_standard_cartesian_chart4D()->SinglePrecision.Point_hid_t
41#define F5T_COORD4_DOUBLE F5B_standard_cartesian_chart4D()->DoublePrecision.Point_hid_t
42#define F5T_VEC4_FLOAT F5B_standard_cartesian_chart4D()->SinglePrecision.Vector_hid_t
43#define F5T_VEC4_DOUBLE F5B_standard_cartesian_chart4D()->DoublePrecision.Vector_hid_t
44#define F5T_BIVEC4_FLOAT F5B_standard_cartesian_chart4D()->SinglePrecision.Vector_hid_t
45#define F5T_BIVEC4_DOUBLE F5B_standard_cartesian_chart4D()->DoublePrecision.Vector_hid_t
46#define F5T_METRIC44_FLOAT F5B_standard_cartesian_chart4D()->SinglePrecision.Metric_hid_t
47#define F5T_METRIC44_DOUBLE F5B_standard_cartesian_chart4D()->DoublePrecision.Metric_hid_t
48
49#define F5T_COORD4_POLAR_FLOAT F5B_standard_polar_chart4D()->SinglePrecision.Point_hid_t
50#define F5T_COORD4_POLAR_DOUBLE F5B_standard_polar_chart4D()->DoublePrecision.Point_hid_t
51
52/* #define F5T_METRIC33_DOUBLE F5B_standard_cartesian_chart3D()->DoublePrecision.Metric_hid_t */
53
54
55/************* 3D charts ************************/
56
57typedef struct { F5_float_t x,y,z; } F5_vec3_float_t;
58typedef struct { F5_float_t x,y,z; } F5_point3_float_t;
59
60typedef struct { F5_double_t x,y,z; } F5_vec3_double_t;
61typedef struct { F5_double_t x,y,z; } F5_point3_double_t;
62
63/** Type for vectors in 3D space with single precision */
65/** Type for points in 3D space with single precision */
67
68/** Type for vectors in 3D space with double precision */
70
71/** Type for points in 3D space with double precision */
73
74
75/* (ancient type, do not use) */
77
78
79/**
80 Symmetric 3x3 tensor in cartesian coordinates.
81 \note Corresponding HDF5 type is F5T_METRIC33_FLOAT
82 */
83typedef struct { F5_float_t gxx, gxy, gyy, gxz, gyz, gzz; } F5_metric3_float_t;
85
86/**\ingroup coords
87 Create a new three-dimensional cartesian coordinate system.
88*/
90
91/**\ingroup coords
92 Use the predefined three dimensional cartesian standard chart.
93 \note This chart is the default chart for all operations which do not
94 explicitly specify another chart.
95*/
97
98#define F5T_COORD3_FLOAT F5B_standard_cartesian_chart3D()->SinglePrecision.Point_hid_t
99#define F5T_VEC3_FLOAT F5B_standard_cartesian_chart3D()->SinglePrecision.Vector_hid_t
100#define F5T_BIVEC3_FLOAT F5B_standard_cartesian_chart3D()->SinglePrecision.Bivector_hid_t
101
102#define F5T_COORD3_DOUBLE F5B_standard_cartesian_chart3D()->DoublePrecision.Point_hid_t
103#define F5T_VEC3_DOUBLE F5B_standard_cartesian_chart3D()->DoublePrecision.Vector_hid_t
104#define F5T_BIVEC3_DOUBLE F5B_standard_cartesian_chart3D()->DoublePrecision.Bivector_hid_t
105
106/**
107HDF5 type for symmetric covariant 3x3 tensors
108\relates F5_metric3_float_t
109*/
110#define F5T_METRIC33_FLOAT F5B_standard_cartesian_chart3D()->SinglePrecision.Metric_hid_t
111
112#define F5T_METRIC33_DOUBLE F5B_standard_cartesian_chart3D()->DoublePrecision.Metric_hid_t
113
114
115/**
116 A type for storing rational numbers.
117 */
118typedef struct
119{
121
123
124typedef struct
125{
127
129
131#define F5T_INT_FRACTION32 F5T_IntegerFraction32()
132
134#define F5T_INT_FRACTION64 F5T_IntegerFraction64()
135
136typedef struct { int ix, iy, iz; } F5_integer_refinement_point_t;
137
138/**\ingroup coords
139 Create a new domain mapping type where each point is mapped
140 to another point, both given by a three-dimensional coordinate
141 that is represented by an integer number.
142 In this case, each source point maps to exactly one target
143 point.
144 */
146
147typedef struct
148{
150}
152
153
159 /** A 32-bit type describing a point in three dimensions using
160 rationial integer coordinates. Both (x,y,z)
161 and array indexing [0],[1],[2] are supported to
162 access the members.
163
164 This struct is not very nice. Would be better to
165 find a simpler way than n-dimensional integer fractions.
166 */
168
169/**\ingroup coords
170 Create a new domain mapping type where each point is mapped
171 to another point, both given by a three-dimensional coordinate
172 that is represented by a rational number.
173 */
175
176/**
177 Point given in polar coordinates.
178 \todo Add HDF5 type
179 */
181
184
186
188
189/************* mixed time and 2D polar **********/
190/* not sure if this is the way how it should be */
192
195
196#define F5T_T_POLAR2_FLOAT F5B_new_global_t_polar2_chart3D()->SinglePrecision.Point_hid_t
197#define F5T_T_POLAR2_DOUBLE F5B_new_global_t_polar2_chart3D()->DoublePrecision.Point_hid_t
198
199
200
201/************* 2D charts ************************/
202
207
208typedef struct { F5_float_t u,v; } F5_texture_point_t;
209
211
212/** Standard chart for texture coordinates */
214
215/************* 1D charts ************************/
216
219
221
222
223/********** CELL TYPES ******************************/
224
225typedef struct { char name[8]; } F5_fragname8_t;
227
228#define F5_FRAGMENT_NEIGHBOUR_CELL_DOMAIN "fragment_neighbor"
229#define F5_FRAGMENT_NEIGHBOUR F5B_new_global_fragname()->SinglePrecision.Point_hid_t
230
231/**
232 Edge pieces.
233 */
234typedef struct { F5_uint32_t i,j; } F5_edge32_t;
235typedef struct { F5_uint64_t i,j; } F5_edge64_t;
236
239#define F5T_EDGE32 F5B_standard_edge_cells()->SinglePrecision.Point_hid_t
240#define F5T_EDGE64 F5B_standard_edge_cells()->DoublePrecision.Point_hid_t
241#define F5_EDGE_CELL_DOMAIN "edge"
242
243/**
244 A triangle.
245 */
246typedef struct { F5_uint32_t i,j,k; } F5_triangle32_t;
247typedef struct { F5_uint64_t i,j,k; } F5_triangle64_t;
248
249/**
250 Default triangle index precision: 32 bit
251 */
253
256
257
260
261/*
262 Triangles using ii,ij,jj as member names.
263 */
264#define F5T_TRIANGLE32 F5B_standard_triangle_cells()->SinglePrecision.Point_hid_t
265#define F5T_TRIANGLE64 F5B_standard_triangle_cells()->DoublePrecision.Point_hid_t
266
267/**
268 Deprecated: Triangles using i,j,k as member names.
269 This naming convention is considered outdated because
270 using ii,ij,jj is a more systematic approach.
271 */
272#define F5T_TRIANGLE32_IJK F5B_standard_triangle_cells_ijk()->SinglePrecision.Point_hid_t
273
274#define F5_TRIANGLE_CELL_DOMAIN "triangular"
275
276/**
277 A cell with four vertices.
278 */
279typedef struct { F5_uint32_t i[2][2]; } F5_quad_t;
280typedef struct { F5_uint32_t i[4]; } F5_quadL_t;
281
284#define F5T_QUAD32 F5B_standard_quad_cells()->SinglePrecision.Point_hid_t
285#define F5_QUAD_CELL_DOMAIN "quad"
286
287
288/**
289 Tetrahedral cells, four vertices.
290 */
291typedef struct { F5_uint32_t i,j,k,l; } F5_tetra32_t;
292typedef struct { F5_uint64_t i,j,k,l; } F5_tetra64_t;
293
296#define F5T_TETRAHEDRON32 F5B_standard_tetrahedral_cells()->SinglePrecision.Point_hid_t
297#define F5T_TETRAHEDRON64 F5B_standard_tetrahedral_cells()->DoublePrecision.Point_hid_t
298#define F5_TETRAHEDRON_CELL_DOMAIN "tetrahedral"
299
300/**
301 A hexahedral cell, preliminiary version.
302 */
303typedef struct { F5_uint32_t i[2][2][2]; } F5_hexahedron32_t;
304typedef struct { F5_uint32_t i[8]; } F5_hexahedronL32_t;
305
308#define F5T_HEXAHEDRON32 F5B_standard_hexahedral_cells()->SinglePrecision.Point_hid_t
309#define F5_HEXAHEDRON_CELL_DOMAIN "hexahedral"
310
311
312/****************** color charts *************************/
315
316#define F5T_COLOR_RGBA_32F F5B_new_global_color_chart_rgba_real()->SinglePrecision.Vector_hid_t
317#define F5T_COLOR_RGBA_8I F5B_new_global_color_chart_rgba_int()->OneBytePrecision.Vector_hid_t
318
319
320
321/************************************************************/
323
324
325
326#ifdef __cplusplus
327} /* extern "C" */
328#endif
329
330#endif /* __F5B_coordinates_H */
331
#define F5_API
Definition F5WinDLLApi.h:11
F5_triangle32_t F5_triangle_t
F5_point3f_t F5_vec3_point_t
F5_API ChartDomain_IDs * F5B_standard_texture_chart2D()
F5_vec3_double_t F5_vec3d_t
F5_API ChartDomain_IDs * F5B_standard_tetrahedral_cells()
F5_API ChartDomain_IDs * F5B_new_global_time_chart1D()
F5_API ChartDomain_IDs * F5B_new_global_quad_cells()
F5_API ChartDomain_IDs * F5B_new_global_polar_chart3D()
ChartDomain_IDs * F5B_new_global_polar_chart4D()
F5_API ChartDomain_IDs * F5B_new_global_edge_cells()
F5_API ChartDomain_IDs * F5B_new_global_cylindrical_chart3D()
F5_API ChartDomain_IDs * F5B_new_global_texture_chart2D()
F5_API ChartDomain_IDs * F5B_standard_triangle_cells_ijk()
F5_point3_double_t F5_point3d_t
F5_API ChartDomain_IDs * F5B_new_global_polar_chart2D()
F5_API ChartDomain_IDs * F5B_new_global_cartesian_chart2D()
F5_API ChartDomain_IDs * F5B_new_global_tetrahedral_cells()
F5_API ChartDomain_IDs * F5B_new_global_spherical_chart1D()
F5_metric3_float_t F5_metric3f_t
F5_vec3_float_t F5_vec3f_t
F5_API ChartDomain_IDs * F5B_new_global_fragname()
F5_API ChartDomain_IDs * F5B_standard_quad_cells()
F5_API ChartDomain_IDs * F5B_standard_hexahedral_cells()
F5_API ChartDomain_IDs * F5B_new_global_triangle_cells_ijk()
F5_API ChartDomain_IDs * F5B_standard_triangle_cells()
F5_API ChartDomain_IDs * F5B_new_global_texture_chart3D()
F5_API ChartDomain_IDs * F5B_new_global_color_chart_rgba_real()
F5_API ChartDomain_IDs * F5B_new_global_spherical_chart2D()
F5_API ChartDomain_IDs * F5B_new_global_axial_chart2D()
F5_API ChartDomain_IDs * F5B_new_global_hexahedral_cells()
F5_API ChartDomain_IDs * F5B_new_global_triangle_cells()
F5_API ChartDomain_IDs * F5B_standard_edge_cells()
F5_API ChartDomain_IDs * F5B_new_global_cartesian_chart1D()
F5_API ChartDomain_IDs * F5B_new_global_color_chart_rgba_int()
F5_API hid_t F5T_IntegerFraction32()
ChartDomain_IDs * F5B_new_global_cartesian_chart4D()
F5_point3_float_t F5_point3f_t
F5_API void F5Bcoordinate_cleanup()
F5_API ChartDomain_IDs * F5B_standard_polar_chart3D()
F5_API ChartDomain_IDs * F5B_new_global_t_polar2_chart3D()
F5_API hid_t F5T_IntegerFraction64()
uint64_t F5_uint64_t
Definition F5types.h:22
float F5_float_t
Definition F5types.h:24
uint32_t F5_uint32_t
Definition F5types.h:21
double F5_double_t
Definition F5types.h:25
F5_API ChartDomain_IDs * F5B_new_rational_regular_domain3D()
F5_API ChartDomain_IDs * F5B_new_global_cartesian_chart3D()
F5_API ChartDomain_IDs * F5B_standard_cartesian_chart3D()
F5_API ChartDomain_IDs * F5B_new_integer_regular_domain3D()
F5_uint32_t j
F5_uint32_t i
F5_uint64_t j
F5_uint64_t i
F5_uint32_t i[2][2][2]
F5_uint32_t i[8]
F5_double_t gtz
F5_double_t gxy
F5_double_t gxx
F5_double_t gyz
F5_double_t gty
F5_double_t gtt
F5_double_t gtx
F5_double_t gxz
F5_double_t gzz
F5_double_t gyy
F5_float_t gyy
F5_float_t gzz
F5_float_t gxy
F5_float_t gtz
F5_float_t gtx
F5_float_t gxx
F5_float_t gty
F5_float_t gyz
F5_float_t gtt
F5_float_t gxz
F5_double_t z
F5_double_t x
F5_double_t y
F5_double_t t
F5_float_t t
F5_float_t y
F5_float_t z
F5_float_t x
F5_uint32_t i[4]
F5_uint32_t i[2][2]
F5_uint32_t k
F5_uint32_t i
F5_uint32_t l
F5_uint32_t j
F5_uint64_t j
F5_uint64_t i
F5_uint64_t k
F5_uint64_t l
F5_double_t t
F5_double_t x
F5_double_t y
F5_double_t z
F5_float_t t
F5_float_t x
F5_float_t y
F5_float_t z
IntegerFraction32 y
IntegerFraction32 x
IntegerFraction32 z
IntegerFraction32 d[3]
IntegerFraction3D crd