Rectangle2D
Description
Represents a rectangle and angle of its rotation.
struct Rectangle2D
{
Point2D origin;
real angle;
real width;
real height;
};
Structure fields and default values (if defined) are described below:
- Point2D Origin - Defines the top-left corner of the rectangle
- real Angle - Rotation angle
- real Width - Horizontal size
- real Height - Vertical size
struct Rectangle2D
{
Point2D Origin;
real Angle;
real Width;
real Height;
Point2D Origin( void ) const { return Origin; };
real Angle( void ) const { return Angle; };
real Width( void ) const { return Width; };
real Height( void ) const { return Height; };
bool operator == ( const avl::Rectangle2D& rhs ) const
{
return Origin == rhs.Origin &&
Angle == rhs.Angle && Width == rhs.Width &&
Height == rhs.Height;
}
bool operator != ( const avl::Rectangle2D& rhs ) const
{
return !(operator==(rhs));
}
};
