SOFA API  ca665544
Open source framework for multi-physics simuation
sofa::geometry::Quad Struct Reference

#include <Quad.h>

Static Public Attributes

static constexpr sofa::Size NumberOfNodes = 4
 
static constexpr ElementType Element_type = ElementType::QUAD
 

Public Member Functions

 Quad ()=delete
 

Static Public Member Functions

template<typename Node , typename T = std::decay_t<decltype(*std::begin(std::declval<Node>()))>, typename = std::enable_if_t<std::is_scalar_v<T>>>
static constexpr auto area (const Node &n0, const Node &n1, const Node &n2, const Node &n3)
 Compute the area of a quadrilateral. More...
 

Attribute details

◆ Element_type

constexpr ElementType sofa::geometry::Quad::Element_type = ElementType::QUAD
staticconstexpr

◆ NumberOfNodes

constexpr sofa::Size sofa::geometry::Quad::NumberOfNodes = 4
staticconstexpr

Constructor details

◆ Quad()

sofa::geometry::Quad::Quad ( )
delete

Function details

◆ area()

template<typename Node , typename T = std::decay_t<decltype(*std::begin(std::declval<Node>()))>, typename = std::enable_if_t<std::is_scalar_v<T>>>
static constexpr auto sofa::geometry::Quad::area ( const Node &  n0,
const Node &  n1,
const Node &  n2,
const Node &  n3 
)
inlinestaticconstexpr

Compute the area of a quadrilateral.

Remarks
The order of nodes needs to be consecutive
Template Parameters
Nodeiterable container
Tscalar
Parameters
n0,n1,n2,n3nodes of the quadrilateral
Returns
Area of the quadrilateral (a T scalar)