Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
iges
rational_basis_spline_surface.hh
1
#ifndef VTESTBED_IGES_RATIONAL_BASIS_SPLINE_SURFACE_HH
2
#define VTESTBED_IGES_RATIONAL_BASIS_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
Rational_basis_spline_surface
:
public
Entity
{
16
17
public
:
18
using
vec3 = blitz::TinyVector<T,3>;
19
using
vertex_array
=
std::vector<std::vector<vec3>
>;
20
using
weight_array
=
std::vector<std::vector<T>
>;
21
using
knot_array
=
std::vector<T>
;
22
23
private
:
24
Integer _u_nsegments = 0;
25
Integer _v_nsegments = 0;
26
Integer _u_degree = 0;
27
Integer _v_degree = 0;
28
Integer _u_closed =
true
;
29
Integer _v_closed =
true
;
30
Integer _u_periodic =
false
;
31
Integer _v_periodic =
false
;
32
Integer _polynomial =
false
;
33
knot_array
_u_knots;
34
knot_array
_v_knots;
35
weight_array
_weights;
36
vertex_array
_points;
37
T _u_min{0};
38
T _u_max{1};
39
T _v_min{0};
40
T _v_max{1};
41
42
public
:
43
44
Rational_basis_spline_surface
() =
default
;
45
46
Rational_basis_spline_surface
(
47
knot_array
u_knots,
48
knot_array
v_knots,
49
weight_array
weights,
50
vertex_array
points
51
);
52
53
protected
:
54
55
void
56
parameters(
iges_ostream
& out)
const override
;
57
58
};
59
60
}
61
62
}
63
64
#endif // vim:filetype=cpp
vtb::iges::Rational_basis_spline_surface
Entity type 128.
Definition:
rational_basis_spline_surface.hh:15
vtb::iges::Entity
Base class for entities.
Definition:
iges/entity.hh:17
vtb
Main namespace.
Definition:
convert.hh:9
std::vector< std::vector< vec3 > >
vtb::iges::iges_ostream
Output stream that automatically wraps text for IGES files.
Definition:
stream.hh:143
Generated by
1.8.15