template<typename T>
Vertex struct
Encodes a location in a 2D image.
Contents
Constructors, destructors, assignment and conversion operators
Functions
- auto Permute() const -> dip::Vertex
- Permute dimensions, swapping x and y values.
- auto Round() const -> dip::Vertex
- Round coordinates to nearest integer.
-
template<typename V>void Vertex
(dip::Vertex v) - Constructor.
Operators
- auto operator*=(dip::dfloat s) -> dip::Vertex&
- Scale by a constant, isotropically.
-
template<typename V>auto operator*=(dip::Vertex v) -> dip::Vertex&
- Scale by a constant, anisotropically.
-
template<typename V>auto operator+=(dip::Vertex v) -> dip::Vertex&
- Add a vertex.
- auto operator+=(T t) -> dip::Vertex&
- Add a constant to both coordinate components.
-
template<typename V>auto operator-=(dip::Vertex v) -> dip::Vertex&
- Subtract a vertex.
- auto operator-=(T t) -> dip::Vertex&
- Subtract a constant from both coordinate components.
- auto operator/=(dip::dfloat s) -> dip::Vertex&
- Scale by the inverse of a constant, isotropically.
-
template<typename V>auto operator/=(dip::Vertex v) -> dip::Vertex&
- Scale by the inverse of a constant, anisotropically.
Variables
Alias documentation
template<typename T>
using dip:: VertexFloat = dip::Vertex
A vertex with floating-point coordinates.
template<typename T>
using dip:: VertexInteger = dip::Vertex
A vertex with integer coordinates
Function documentation
template<typename T>
Vertex(
) constexpr
Default constructor.
template<typename T>
Vertex(
T x, T y) constexpr
Constructor.
template<typename T>
template<typename V>
void
Vertex (
dip::Vertex v)
template<typename V>
Constructor.
template<typename T>
dip::Vertex
Round(
) const
Round coordinates to nearest integer.
template<typename T>
dip::Vertex
Permute(
) const
Permute dimensions, swapping x and y values.
template<typename T>
template<typename V>
dip::Vertex&
operator+=(
dip::Vertex v)
template<typename V>
Add a vertex.
template<typename T>
template<typename V>
dip::Vertex&
operator-=(
dip::Vertex v)
template<typename V>
Subtract a vertex.
template<typename T>
dip::Vertex&
operator+=(
T t)
Add a constant to both coordinate components.
template<typename T>
dip::Vertex&
operator-=(
T t)
Subtract a constant from both coordinate components.
template<typename T>
dip::Vertex&
operator*=(
dip::dfloat s)
Scale by a constant, isotropically.
template<typename T>
template<typename V>
dip::Vertex&
operator*=(
dip::Vertex v)
template<typename V>
Scale by a constant, anisotropically.
template<typename T>
dip::Vertex&
operator/=(
dip::dfloat s)
Scale by the inverse of a constant, isotropically.
template<typename T>
template<typename V>
dip::Vertex&
operator/=(
dip::Vertex v)
template<typename V>
Scale by the inverse of a constant, anisotropically.
template<typename T>
template<typename T>
bool
dip:: operator==(
dip::Vertex v1, dip::Vertex v2)
template<typename T>
Compare two vertices.
template<typename T>
template<typename T>
dip::dfloat
dip:: Norm(
dip::Vertex const& v)
template<typename T>
The norm of the vector v.
template<typename T>
template<typename T>
dip::dfloat
dip:: NormSquare(
dip::Vertex const& v)
template<typename T>
The square of the norm of the vector v.
template<typename T>
template<typename T>
dip::dfloat
dip:: Distance(
dip::Vertex const& v1, dip::Vertex const& v2)
template<typename T>
The norm of the vector v2-v1.
template<typename T>
template<typename T>
dip::dfloat
dip:: DistanceSquare(
dip::Vertex const& v1, dip::Vertex const& v2)
template<typename T>
The square norm of the vector v2-v1.
template<typename T>
template<typename T>
dip::dfloat
dip:: Angle(
dip::Vertex const& v1, dip::Vertex const& v2)
template<typename T>
The angle of the vector v2-v1.
template<typename T>
template<typename T>
dip::dfloat
dip:: CrossProduct(
dip::Vertex const& v1, dip::Vertex const& v2)
template<typename T>
Compute the z component of the cross product of vectors v1 and v2.
template<typename T>
template<typename T>
dip::dfloat
dip:: ParallelogramSignedArea(
dip::Vertex const& v1, dip::Vertex const& v2, dip::Vertex const& v3)
template<typename T>
Compute the z component of the cross product of vectors v2-v1 and v3-v1.
template<typename T>
template<typename T>
dip::dfloat
dip:: TriangleArea(
dip::Vertex const& v1, dip::Vertex const& v2, dip::Vertex const& v3)
template<typename T>
Compute the area of the triangle formed by vertices v1, v2 and v3.
template<typename T>
template<typename T>
dip::dfloat
dip:: TriangleHeight(
dip::Vertex const& v1, dip::Vertex const& v2, dip::Vertex const& v3)
template<typename T>
Compute the height of the triangle formed by vertices v1, v2 and v3, with v3 the tip.
template<typename T>
template<typename T>
dip::Vertex
dip:: operator+(
dip::Vertex lhs, dip::Vertex const& rhs)
template<typename T>
Add two vertices together, with identical types.
template<typename T>
dip::VertexFloat
dip:: operator+(
dip::VertexFloat lhs, dip::VertexInteger const& rhs)
Add two vertices together, where the LHS is floating-point and the RHS is integer.
template<typename T>
dip::VertexFloat
dip:: operator+(
dip::VertexInteger const& lhs, dip::VertexFloat rhs)
Add two vertices together, where the LHS is integer and the RHS is floating-point.
template<typename T>
template<typename T>
dip::Vertex
dip:: operator-(
dip::Vertex lhs, dip::Vertex const& rhs)
template<typename T>
Subtract two vertices from each other.
template<typename T>
dip::VertexFloat
dip:: operator-(
dip::VertexFloat lhs, dip::VertexInteger const& rhs)
Subtract two vertices from each other, where the LHS is floating-point and the RHS is integer.
template<typename T>
dip::VertexFloat
dip:: operator-(
dip::VertexInteger const& lhs, dip::VertexFloat const& rhs)
Subtract two vertices from each other, where the LHS is integer and the RHS is floating-point.
template<typename T>
template<typename T, typename S>
dip::Vertex
dip:: operator+(
dip::Vertex v, S t)
template<typename T, typename S>
Add a vertex and a constant.
template<typename T>
template<typename T, typename S>
dip::Vertex
dip:: operator-(
dip::Vertex v, S t)
template<typename T, typename S>
Subtract a vertex and a constant.
template<typename T>
template<typename T>
dip::Vertex
dip:: operator*(
dip::Vertex v, dip::dfloat s)
template<typename T>
Multiply a vertex and a constant, scaling isotropically.
template<typename T>
template<typename T>
dip::Vertex
dip:: operator*(
dip::Vertex lhs, dip::Vertex const& rhs)
template<typename T>
Multiply a vertex by another vertex, scaling anisotropically.
template<typename T>
dip::VertexFloat
dip:: operator*(
dip::VertexFloat lhs, dip::VertexInteger const& rhs)
Multiply a vertex by another vertex, scaling anisotropically, where the LHS is floating-point and the RHS is integer.
template<typename T>
dip::VertexFloat
dip:: operator*(
dip::VertexInteger const& lhs, dip::VertexFloat const& rhs)
Multiply a vertex by another vertex, scaling anisotropically, where the LHS is integer and the RHS is floating-point.
template<typename T>
template<typename T>
dip::Vertex
dip:: operator/(
dip::Vertex v, dip::dfloat s)
template<typename T>
Divide a vertex by a constant, scaling isotropically.
template<typename T>
template<typename T>
dip::Vertex
dip:: operator/(
dip::Vertex lhs, dip::Vertex const& rhs)
template<typename T>
Divide a vertex by another vertex, scaling anisotropically.
template<typename T>
dip::VertexFloat
dip:: operator/(
dip::VertexFloat lhs, dip::VertexInteger const& rhs)
Divide a vertex by another vertex, scaling anisotropically, where the LHS is floating-point and the RHS is integer.
template<typename T>
dip::VertexFloat
dip:: operator/(
dip::VertexInteger const& lhs, dip::VertexFloat const& rhs)
Divide a vertex by another vertex, scaling anisotropically, where the LHS is integer and the RHS is floating-point.
Variable documentation
template<typename T>
T x
The x-coordinate
template<typename T>
T y
The y-coordinate