H2Lib  3.0
macrosurface3d.h
Go to the documentation of this file.
1 /* ------------------------------------------------------------
2  This is the file "macrosurface3d.h" of the H2Lib package.
3  All rights reserved, Steffen Boerm 2010
4  ------------------------------------------------------------ */
5 
10 #ifndef MACROSURFACE3D_H
11 #define MACROSURFACE3D_H
12 
25 
28 
31 
32 #include "settings.h"
33 #include "surface3d.h"
34 
51 
54 
57 
59  real (*x)[3];
60 
62  uint (*e)[2];
63 
71  uint (*t)[3];
72 
76  uint (*s)[3];
77 
96  void (*phi)(uint i, real xr1, real xr2, void *phidata, real xt[3]);
97 
100  void *phidata;
101 };
102 
103 /* ------------------------------------------------------------
104  * Constructor and destructor
105  * ------------------------------------------------------------ */
106 
115 
119 HEADER_PREFIX void
121 
122 /* ------------------------------------------------------------
123  * Examples
124  * ------------------------------------------------------------ */
125 
131 
144 
163 new_cuboid_macrosurface3d(real ax, real bx, real ay, real by, real az, real bz);
164 
173 
182 
183 /* ------------------------------------------------------------
184  * Polygonal approximation
185  * ------------------------------------------------------------ */
186 
200 
201 /* ------------------------------------------------------------
202  * Interactive setup of a surface3d object
203  * ------------------------------------------------------------ */
204 
213 
216 #endif
void(* phi)(uint i, real xr1, real xr2, void *phidata, real xt[3])
Parametrization callback.
Definition: macrosurface3d.h:96
uint(* e)[2]
Edge vertices.
Definition: macrosurface3d.h:62
pmacrosurface3d new_macrosurface3d(uint vertices, uint edges, uint triangles)
Create a macrosurface3d object.
pmacrosurface3d new_cube_macrosurface3d()
Creates a new macrosurface3d object for a unit cube.
void * phidata
Pointer that will be passed to the phi callback function.
Definition: macrosurface3d.h:100
psurface3d build_interactive_surface3d()
Create a surface3d object interactively.
psurface3d build_from_macrosurface3d_surface3d(pcmacrosurface3d mg, uint split)
Create a triangular mesh from a macrosurface3d object.
uint(* t)[3]
Triangle vertices.
Definition: macrosurface3d.h:71
pmacrosurface3d new_parabolic_mirror_macrosurface3d()
Creates a new macrosurface3d object for a parabolic mirror.
unsigned uint
Unsigned integer type.
Definition: settings.h:70
uint(* s)[3]
Triangle edges.
Definition: macrosurface3d.h:76
const macrosurface3d * pcmacrosurface3d
Pointer to a constant macrosurface3d object.
Definition: macrosurface3d.h:30
pmacrosurface3d new_cylinder_macrosurface3d()
Create a macrosurface3d object for a cylinder.
pmacrosurface3d new_sphere_macrosurface3d()
Create a macrosurface3d object for the unit sphere.
Representation of a parametrized surface.
Definition: macrosurface3d.h:48
uint vertices
Number of vertices.
Definition: macrosurface3d.h:50
pmacrosurface3d new_cuboid_macrosurface3d(real ax, real bx, real ay, real by, real az, real bz)
Creates a new macrosurface3d object for a cuboid.
void del_macrosurface3d(pmacrosurface3d mg)
Delete a macrosurface3d object.
Representation of a triangle surface mesh.
Definition: surface3d.h:45
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
real(* x)[3]
Vertex coordinates.
Definition: macrosurface3d.h:59
uint edges
Number of edges.
Definition: macrosurface3d.h:53
macrosurface3d * pmacrosurface3d
Pointer to a macrosurface3d object.
Definition: macrosurface3d.h:27
uint triangles
Number of triangles.
Definition: macrosurface3d.h:56