libimgdoc2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
imgdoc2::RectangleT< t > Struct Template Reference

#include <types.h>

Public Member Functions

 RectangleT ()
 Default constructor which sets all properties to zero.
 
 RectangleT (t x, t y, t w, t h)
 
bool IsPointInside (const PointT< t > &p) const
 

Public Attributes

x
 The x-coordinate of the edge point of the rectangle.
 
y
 The y-coordinate of the edge point of the rectangle.
 
w
 The width of the rectangle.
 
h
 The height of the rectangle.
 

Detailed Description

template<typename t>
struct imgdoc2::RectangleT< t >

Structure defining an axis-aligned rectangle in two dimensions.

Template Parameters
tGeneric type parameter.

Constructor & Destructor Documentation

◆ RectangleT()

template<typename t >
imgdoc2::RectangleT< t >::RectangleT ( x,
y,
w,
h 
)
inline

Constructor

Exceptions
std::invalid_argumentThrown when an invalid argument error condition occurs.
Parameters
xThe x-coordinate of the edge point of the rectangle.
yThe y-coordinate of the edge point of the rectangle.
wThe width of the rectangle.
hThe height of the rectangle.

Member Function Documentation

◆ IsPointInside()

template<typename t >
bool imgdoc2::RectangleT< t >::IsPointInside ( const PointT< t > &  p) const
inline

Query if the specified point 'p' is inside the rectangle.

Parameters
pThe point to test.
Returns
True if point inside, false if not.

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