|
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 | squaredLength (const Node &n0, const Node &n1) |
| Compute the squared length (or norm) of an edge. More...
|
|
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 | length (const Node &n0, const Node &n1) |
| Compute the length (or norm) of an edge. More...
|
|
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 | getBarycentricCoordinates (const Node &point, const Node &n0, const Node &n1) |
| Compute the barycentric coordinates of input point on Edge (n0, n1). It can be interpreted as masses placed at the Edge vertices such that the point is the center of mass of these masses. No check is done if point is on Edge. Method. More...
|
|
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 bool | isPointOnEdge (const Node &p0, const Node &n0, const Node &n1) |
| Test if a point is on Edge (n0, n1) More...
|
|
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 bool | intersectionWithPlane (const Node &n0, const Node &n1, const sofa::type::Vec< 3, T > &planeP0, const sofa::type::Vec< 3, T > &normal, sofa::type::Vec< 3, T > &intersection) |
| Compute the intersection between a plane (defined by a point and a normal) and the Edge (n0, n1) More...
|
|
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 bool | intersectionWithEdge (const Node &pA, const Node &pB, const Node &pC, const Node &pD, sofa::type::Vec< 2, T > &intersectionBaryCoord) |
| Compute the intersection coordinate of the 2 input edges. More...
|
|
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::Edge::getBarycentricCoordinates |
( |
const Node & |
point, |
|
|
const Node & |
n0, |
|
|
const Node & |
n1 |
|
) |
| |
|
inlinestaticconstexpr |
Compute the barycentric coordinates of input point on Edge (n0, n1). It can be interpreted as masses placed at the Edge vertices such that the point is the center of mass of these masses. No check is done if point is on Edge. Method.
- See also
- isPointOnEdge can be used before to check that.
- Template Parameters
-
Node | iterable container |
T | scalar |
- Parameters
-
point | position of the point to compute the coefficients |
n0,n1 | nodes of the edge |
- Returns
- sofa::type::Vec<2, T> barycentric coefficients of each vertex of the Edge.