1 #ifndef VTESTBED_CORE_SHIP_HULL_PANEL_HH 2 #define VTESTBED_CORE_SHIP_HULL_PANEL_HH 4 #include <vtestbed/core/grid.hh> 5 #include <vtestbed/core/types.hh> 6 #include <vtestbed/geometry/math.hh> 17 template <
class T,
int N>
21 static constexpr
const int 28 using vec = blitz::TinyVector<T,N>;
37 struct {
bool _wetted =
false;
bool _waterline =
false; };
49 inline const vec&
centre()
const {
return this->_centre; }
50 inline void centre(
const vec& rhs) { this->_centre = rhs; }
53 inline const vec&
normal()
const {
return this->_normal; }
54 inline void normal(
const vec& rhs) { this->_normal = rhs; }
57 inline T
area()
const {
return this->_area; }
58 inline void area(T rhs) { this->_area = rhs; }
61 inline T
volume()
const {
return this->_volume; }
62 inline void volume(T rhs) { this->_volume = rhs; }
68 inline const vec&
force()
const {
return this->_force; }
69 inline vec&
force() {
return this->_force; }
71 inline bool wetted()
const {
return this->_wetted; }
72 inline void wetted(
bool rhs) { this->_wetted = rhs; }
74 inline bool waterline()
const {
return this->_waterline; }
75 inline void waterline(
bool rhs) { this->_waterline = rhs; }
85 clamp(
const Grid<T,3>& grid_xyz,
const std::vector<Ship_hull_panel<T,3>>& panels);
91 #endif // vim:filetype=cpp T area() const
Get surface area.
Triangular ship hull panel (face).
T volume() const
Get tetrahedron volume.
const vec & centre() const
Get the centre of the panel in body-fixed coordinate system.
const vec & normal() const
Get surface normal.
const vec & force() const