.. index:: pair: class; EE::Math::tRECT .. _doxid-class_e_e_1_1_math_1_1t_r_e_c_t: template class EE::Math::tRECT ============================== .. toctree:: :hidden: Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include template class tRECT { public: // fields T :target:`Left`; T :target:`Right`; T :target:`Top`; T :target:`Bottom`; // construction :target:`tRECT`(T left, T top, T right, T bottom); :target:`tRECT`(const :ref:`Vector2`& pos, const :ref:`tSize`& size); :target:`tRECT`(); // methods tRECT :target:`copy`() const; tRECT& :target:`setPosition`(const :ref:`Vector2`& pos); bool :target:`intersect`(const tRECT& rect) const; bool :target:`contains`(const tRECT& rect) const; bool :target:`contains`(const :ref:`Vector2`& Vect) const; tRECT& :target:`expand`(const tRECT& rect); tRECT& :target:`shrink`(const tRECT& rect); tRECT& :target:`expand`(const :ref:`Vector2`& Vect); T :target:`area`() const; T :target:`mergedArea`(const tRECT& rect) const; bool :target:`overlap`(const tRECT& rect) const; bool :target:`intersectsSegment`(const :ref:`Vector2`& a, const :ref:`Vector2`& b) const; bool :ref:`intersectCircle`(:ref:`Vector2` pos, const T& radius) const; bool :ref:`intersectCircles`(const tRECT& b) const; :ref:`Vector2` :target:`clampVector`(const :ref:`Vector2`& Vect) const; :ref:`Vector2` :target:`wrapVector`(const :ref:`Vector2`& Vect) const; :ref:`Vector2` :target:`getPosition`() const; :ref:`Vector2` :target:`getCenter`() const; :ref:`tSize` :target:`getSize`() const; T :target:`getWidth`() const; T :target:`getHeight`() const; tRECT :target:`ceil`() const; tRECT :target:`floor`() const; tRECT :target:`round`() const; tRECT :target:`roundUp`() const; tRECT :target:`roundDown`() const; tRECT& :target:`scale`(T scale, const :ref:`Vector2`& center); tRECT& :target:`scale`(T scale); tRECT& :target:`scale`(:ref:`Vector2` scale, const :ref:`Vector2`& center); tRECT& :target:`scale`(:ref:`Vector2` scale); tRECT<:ref:`Float`> :target:`asFloat`() const; tRECT :target:`asInt`() const; }; .. _details-class_e_e_1_1_math_1_1t_r_e_c_t: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Methods ------- .. index:: pair: function; intersectCircle .. _doxid-class_e_e_1_1_math_1_1t_r_e_c_t_1afb318e794a80fe46678505c906f9864b: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool intersectCircle(:ref:`Vector2` pos, const T& radius) const Determine if a RECT and a Circle are intersecting .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - pos - Circle position * - radius - Circle Radius .. rubric:: Returns: True if are intersecting .. index:: pair: function; intersectCircles .. _doxid-class_e_e_1_1_math_1_1t_r_e_c_t_1a1663704ec938d1bfa9f26608ec9b5a7c: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool intersectCircles(const tRECT& b) const Determine if a RECT ( representing a circle ) is intersecting another RECT ( also representing a circle )