Into

Modules

Documentation

classPiiRectangle

#include <PiiRectangle.h>

Stores the upper left corner and the size of a rectangle.

Description

See PiiPoint for usage examples.

Constructors and destructor

(
  • T xVal = 0
  • T yVal = 0
  • T w = 0
  • T h = 0
)

Public member functions

bool
(
  • T x
  • T y
)

Returns true if the point (x,y) is within this rectangle.

bool
( )

Returns true if other is fully contained by this.

bool
( )

Returns true if other intersects this.

bool
( )

Return true if either width or height is non-positive, false otherwise.

bool
( )
bool
( )
( )

Enlarges this rectangle to include both this and other.

template<class Archive>
void
(
  • Archive & archive
  • const unsigned int
)

Function details

  • PiiRectangle

    (
    • T xVal = 0
    • T yVal = 0
    • T w = 0
    • T h = 0
    )
    [inline]
  • bool contains

    (
    • T x
    • T y
    )
    [inline]

    Returns true if the point (x,y) is within this rectangle.

  • bool contains

    ( )
    [inline]

    Returns true if other is fully contained by this.

  • bool intersects

    ( )
    [inline]

    Returns true if other intersects this.

  • bool isEmpty

    ()
    [inline]

    Return true if either width or height is non-positive, false otherwise.

  • bool operator!=

    ( )
    [inline]
  • bool operator==

    ( )
    [inline]
  • PiiRectangle & operator|=

    ( )
    [inline]

    Enlarges this rectangle to include both this and other.

  • template<class Archive>

    void serialize

    (
    • Archive & archive
    • const unsigned int
    )
    [inline]
Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.