8#ifndef META_OCEAN_CV_ADVANCED_PIXEL_TRIANGLE_H
9#define META_OCEAN_CV_ADVANCED_PIXEL_TRIANGLE_H
147 explicit inline operator bool()
const;
218 ocean_assert(triangle.
isValid());
219 ocean_assert(width >= 1u && height >= 1u);
325 ocean_assert(index <= 2u);
332 ocean_assert(index <= 2u);
This class implements a 2D triangle with pixel precision.
Definition PixelTriangle.h:70
T right() const
Returns the most right (including) position of this triangle.
Definition PixelTriangle.h:259
const PixelPositionT< unsigned int > & point1() const
PixelTriangleT()
Creates an invalid triangle.
Definition PixelTriangle.h:202
T bottom() const
Returns the most bottom (including) position of this triangle.
Definition PixelTriangle.h:266
const PixelPositionT< unsigned int > & point0() const
const PixelPositionT< unsigned int > & point2() const
T top() const
Returns the most top (including) position of this triangle.
Definition PixelTriangle.h:252
PixelTriangleT(const Triangle2 &triangle, const unsigned int width, const unsigned int height)
Creates a triangle by a given triangle with subpixel accuracy.
Definition PixelTriangle.h:216
PixelPositionT< T > & operator[](const unsigned int index)
Returns individual triangle corners.
Definition PixelTriangle.h:330
const PixelPositionT< T > & operator[](const unsigned int index) const
Returns individual triangle corners.
Definition PixelTriangle.h:323
bool isValid() const
Returns whether this triangle holds three valid corner points.
Definition PixelTriangle.h:273
PixelTriangleT< T > & operator+=(const CV::PixelPositionT< T > &offset)
Shifts the corners of this triangle by a given offset (by adding the offset to each corner).
Definition PixelTriangle.h:292
PixelTriangleT< T > operator+(const CV::PixelPositionT< T > &offset) const
Shifts the corners of the triangle by a given offset (by adding the offset to each corner) and return...
Definition PixelTriangle.h:285
T left() const
Returns the most left (including) position of this triangle.
Definition PixelTriangle.h:245
PixelTriangleT(const PixelPositionT< T > &point0, const PixelPositionT< T > &point1, const PixelPositionT< T > &point2)
Creates a triangle by three corners.
Definition PixelTriangle.h:208
PixelTriangleT< T > & operator-=(const CV::PixelPositionT< T > &offset)
Shifts the corners of this triangle by a given offset (by subtracting the offset from each corner).
Definition PixelTriangle.h:311
PixelPositionT< unsigned int > trianglePoints[3]
Definition PixelTriangle.h:198
PixelTriangleT< T > operator-(const CV::PixelPositionT< T > &offset) const
Shifts the corners of the triangle by a given offset (by subtracting the offset from each corner) and...
Definition PixelTriangle.h:304
This class implements a 2D pixel position with pixel precision.
Definition PixelPosition.h:63
bool isValid() const
Returns whether this pixel position object holds two valid parameters.
static constexpr int32_t round32(const Scalar value)
const VectorT2< T > & point2() const
Returns the third triangle corner.
Definition Triangle2.h:416
const VectorT2< T > & point0() const
Returns the first triangle corner.
Definition Triangle2.h:404
const VectorT2< T > & point1() const
Returns the second triangle corner.
Definition Triangle2.h:410
bool isValid() const
Returns whether this triangle can provide valid barycentric coordinates (for 64 bit floating point va...
Definition Triangle2.h:798
const T & x() const noexcept
Returns the x value.
Definition Vector2.h:703
const T & y() const noexcept
Returns the y value.
Definition Vector2.h:715
T minmax(const T &lowerBoundary, const T &value, const T &upperBoundary)
This function fits a given parameter into a specified value range.
Definition base/Utilities.h:973
PixelPositionT< unsigned int > PixelPosition
Definition of the default PixelPosition object with a data type allowing only positive coordinate val...
Definition PixelPosition.h:32
std::vector< PixelTriangle > PixelTriangles
Definition of a vector holding pixel triangles (with positive coordinate values).
Definition PixelTriangle.h:53
PixelTriangleT< unsigned int > PixelTriangle
Definition of the default PixelTriangle object with a data type allowing only positive coordinate val...
Definition PixelTriangle.h:39
std::vector< PixelTriangleI > PixelTrianglesI
Definition of a vector holding pixel triangles (with positive and negative coordinate values).
Definition PixelTriangle.h:60
PixelTriangleT< int > PixelTriangleI
Definition of a PixelTriangle object with a data type allowing positive and negative coordinate value...
Definition PixelTriangle.h:46
TriangleT2< Scalar > Triangle2
Definition of the Triangle2 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with sing...
Definition Triangle2.h:28
Namespace of the CV Advanced library.
Definition Advanced.h:20
Namespace of the CV library.
Definition Advanced.h:17
The namespace covering the entire Ocean framework.
Definition Accessor.h:15