system
The vocabulary types everything else shares
Loading...
Searching...
No Matches
Rect< T > Struct Template Reference

#include <Shape.hpp>

Public Member Functions

Vector2< T > center () const
 
Vector2< T > half () const
 
Vector2< T > corner () const
 
Vector2< T > size () const
 
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
bool intersects (const Rect &o, T margin=T(0)) const
 

Public Attributes

T x
 
T y
 
T w
 
T h
 

Member Function Documentation

◆ center()

template<typename T >
Vector2< T > Rect< T >::center ( ) const
inline

◆ corner()

template<typename T >
Vector2< T > Rect< T >::corner ( ) const
inline

◆ half()

template<typename T >
Vector2< T > Rect< T >::half ( ) const
inline

◆ intersects()

template<typename T >
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
bool Rect< T >::intersects ( const Rect< T > &  o,
T  margin = T(0) 
) const
inline

◆ size()

template<typename T >
Vector2< T > Rect< T >::size ( ) const
inline

Member Data Documentation

◆ h

template<typename T >
T Rect< T >::h

◆ w

template<typename T >
T Rect< T >::w

◆ x

template<typename T >
T Rect< T >::x

◆ y

template<typename T >
T Rect< T >::y

The documentation for this struct was generated from the following file: