AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ARect< T > Struct Template Reference

Axis aligned 2D rectangle.

#include <AUI/Geometry2D/ARect.h>

Public Member Functions#

bool operator== (const ARect &) const noexcept=default
 
APoint2D< T > leftTop () const noexcept
 
APoint2D< T > rightBottom () const noexcept
 
APoint2D< T > rightTop () const noexcept
 
APoint2D< T > leftBottom () const noexcept
 
bool isInside (APoint2D< T > other) const noexcept
 
bool isIntersects (APoint2D< T > other) const noexcept
 
std::array< APoint2D< T >, 4 > vertices () const noexcept
 
APoint2D< T > center () const noexcept
 
APoint2D< T > min () const noexcept
 
APoint2D< T > max () const noexcept
 
area () const noexcept
 
ALineSegment< T > topLineSegment () const noexcept
 
ALineSegment< T > leftLineSegment () const noexcept
 
ALineSegment< T > rightLineSegment () const noexcept
 
ALineSegment< T > bottomLineSegment () const noexcept
 
bool isIntersects (ARect other) const noexcept
 
APoint2D< T > size () const noexcept
 
ARecttranslate (glm::ivec2 by) noexcept
 

Static Public Member Functions#

static ARect fromTopLeftPositionAndSize (APoint2D< T > position, APoint2D< T > size)
 
static ARect fromCenterPositionAndSize (APoint2D< T > position, APoint2D< T > size)
 

Signals and public fields#

APoint2D< T > p1
 
APoint2D< T > p2
 

Member Function Documentation#

◆ isIntersects()#

template<typename T>
bool ARect< T >::isIntersects ( ARect< T > other) const
inlinenodiscardnoexcept
Returns
true if other intersects with this (even if intersection area =0!)