Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
iges
parametric_spline_surface.hh
1
#ifndef VTESTBED_IGES_PARAMETRIC_SPLINE_SURFACE_HH
2
#define VTESTBED_IGES_PARAMETRIC_SPLINE_SURFACE_HH
3
4
#include <blitz/array.h>
5
6
#include <vtestbed/iges/entity.hh>
7
#include <vtestbed/iges/types.hh>
8
9
namespace
vtb
{
10
11
namespace
iges {
12
14
template
<
class
T>
15
class
Parametric_spline_surface
:
public
Entity
{
16
17
public
:
18
19
struct
Coefficients
{
20
T x[16] {};
21
T y[16] {};
22
T z[16] {};
23
};
24
25
static_assert(
sizeof
(
Coefficients
) == 48*
sizeof
(T),
"bad size"
);
26
27
typedef
std::vector<T>
array_1d
;
28
typedef
std::vector<std::vector<Coefficients>
>
coefficient_array
;
29
typedef
blitz::TinyVector<T,3> vec3;
30
typedef
std::vector<vec3>
vertex_array_1d
;
31
typedef
std::vector<vertex_array_1d>
vertex_array_2d
;
32
33
private
:
34
Integer _boundary_type = 1;
35
Integer _patch_type = 0;
36
Integer _nsegments_u = 0;
37
Integer _nsegments_v = 0;
38
array_1d
_u;
39
array_1d
_v;
40
coefficient_array
_coefficients;
41
42
public
:
43
44
explicit
45
Parametric_spline_surface
(
const
vertex_array_2d
& data,
bool
cyclic=
false
);
46
47
protected
:
48
49
void
50
parameters(
iges_ostream
& out)
const override
;
51
52
};
53
54
}
55
56
}
57
58
#endif // vim:filetype=cpp
vtb::iges::Parametric_spline_surface
Entity type 114.
Definition:
parametric_spline_surface.hh:15
vtb::iges::Parametric_spline_surface::Coefficients
Definition:
parametric_spline_surface.hh:19
vtb::iges::Entity
Base class for entities.
Definition:
iges/entity.hh:17
vtb
Main namespace.
Definition:
convert.hh:9
std::vector< T >
vtb::iges::iges_ostream
Output stream that automatically wraps text for IGES files.
Definition:
stream.hh:143
Generated by
1.8.15