template <class T, int N>
class vtb::core::Ship_hull_panel

Triangular ship hull panel (face).

Types
  • using flag_type = unsigned int
  • using triangle_type = vtb::geometry::Triangle< T, N >
  • using vec = blitz::TinyVector< T, N >
Fields
  • T padding[5]
  • int _index
  • flag_type _flags
  • constexpr const flag_type Above_z
  • constexpr const flag_type Above_y
  • constexpr const flag_type Above_x
  • constexpr const flag_type Waterline
  • constexpr const flag_type Wet
Methods
  • index(int rhs) -> void
  • index() const -> int
  • degenerate() const -> bool

    Check if the area is nought.

  • above(int i, bool rhs) -> void
  • above(int i) const -> bool
  • waterline(bool rhs) -> void
  • waterline() const -> bool
  • dry(bool rhs) -> void
  • dry() const -> bool
  • wet(bool rhs) -> void
  • wet() const -> bool
  • unsetf(flag_type rhs) -> void
  • setf(flag_type rhs) -> void
  • force(const vec & rhs) -> void
  • force() const -> const vec &

    Get the force applied to the centre of the panel in the direction of the normal.

  • area(T rhs) -> void
  • area() const -> T

    Get surface area.

  • normal(const vec & rhs) -> void
  • normal() const -> const vec &

    Get surface normal.

  • centre(const vec & rhs) -> void
  • centre() const -> const vec &

    Get the centre of the panel.

  • triangle(const triangle_type & rhs) -> void
  • triangle() const -> const triangle_type &

    Get panel face.

  • operator=(const Ship_hull_panel &) -> Ship_hull_panel &
  • ~Ship_hull_panel()
  • Ship_hull_panel()
  • Ship_hull_panel(const vec & centre, vec n, T area)
  • Ship_hull_panel(const triangle_type & base)explicit
  • above_flag(int i) -> constexpr const flag_type
template <class T>
clamp(const Grid< T, 3 > & grid_xyz, const std::vector< Ship_hull_panel< T, 3 >> & panels, Vector< int, 3 > min_shape, Vector< bool, 3 > power_of_two = Vector< bool, 3 >(false)) -> Grid< T, 3 >

Determine minimum and maximum indices for calculating derivatives using panels and slice the grid.

template <class T>
clamp_domain(const Grid< T, 3 > & grid_xyz, const std::vector< Ship_hull_panel< T, 3 >> & panels, Vector< int, 3 > min_shape, Vector< bool, 3 > power_of_two = Vector< bool, 3 >(false)) -> blitz::RectDomain< 3 >
template <class T>
intersect(const vtb::geometry::Triangle< T, 3 > & panel, const Vector< T, 3 > & water_level, std::vector< vtb::geometry::Triangle< T, 3 >> * wet_panels, std::vector< vtb::geometry::Triangle< T, 3 >> * dry_panels, std::vector< vtb::geometry::Line_segment< T, 3 >> * waterline) -> void