![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <Rectangle.hpp>


Public Member Functions | |
| CU_API | Rectangle (Position const &origin=Position(), Size const &size=Size()) |
| Constructor. | |
| CU_API | Rectangle (int32_t left, int32_t top, int32_t right, int32_t bottom) |
| Constructor. | |
| CU_API Intersection | intersects (Position const &point) const |
| Test if the givent point is onto or into this rectangle. | |
| CU_API Intersection | intersects (Rectangle const &rect) const |
| Test if the givent rectangle intersects this rectangle. | |
| CU_API void | set (int32_t left, int32_t top, int32_t right, int32_t bottom) |
| sets the rectangle values | |
| CU_API void | size (Size &result) const |
| Retrieves the rectangle size. | |
| int | left () const |
| Retrieves the left coordinate. | |
| int & | left () |
| Retrieves the left coordinate. | |
| int | right () const |
| Retrieves the right coordinate. | |
| int & | right () |
| Retrieves the right coordinate. | |
| int | top () const |
| Retrieves the top coordinate. | |
| int & | top () |
| Retrieves the top coordinate. | |
| int | bottom () const |
| Retrieves the bottom coordinate. | |
| int & | bottom () |
| Retrieves the bottom coordinate. | |
| int | getWidth () const |
| Retrieves the width. | |
| int | getHeight () const |
| Retrieves the height. | |
| CU_API castor::Rectangle::Rectangle | ( | int32_t | left, |
| int32_t | top, | ||
| int32_t | right, | ||
| int32_t | bottom ) |
Constructor.
| [in] | left,top | Top left point |
| [in] | right,bottom | Right bottom point |
|
inline |
Retrieves the bottom coordinate.
References castor::RectangleData::Mbr::bottom, castor::DataHolderT< RectangleData >::getData(), and castor::RectangleData::rect.

|
inline |
Retrieves the bottom coordinate.
References castor::RectangleData::Mbr::bottom, castor::DataHolderT< RectangleData >::getData(), and castor::RectangleData::rect.

|
inline |
Retrieves the height.
References castor::RectangleData::Mbr::bottom, castor::DataHolderT< RectangleData >::getData(), castor::RectangleData::rect, and castor::RectangleData::Mbr::top.

|
inline |
Retrieves the width.
References castor::DataHolderT< RectangleData >::getData(), castor::RectangleData::Mbr::left, castor::RectangleData::rect, and castor::RectangleData::Mbr::right.

| CU_API Intersection castor::Rectangle::intersects | ( | Position const & | point | ) | const |
Test if the givent point is onto or into this rectangle.
| [in] | point | The point to test |
Intersection::eIn if onto or into, Intersection::eOut if not | CU_API Intersection castor::Rectangle::intersects | ( | Rectangle const & | rect | ) | const |
Test if the givent rectangle intersects this rectangle.
| [in] | rect | The rectangle to test |
|
inline |
Retrieves the left coordinate.
References castor::DataHolderT< RectangleData >::getData(), castor::RectangleData::Mbr::left, and castor::RectangleData::rect.

|
inline |
Retrieves the left coordinate.
References castor::DataHolderT< RectangleData >::getData(), castor::RectangleData::Mbr::left, and castor::RectangleData::rect.

|
inline |
Retrieves the right coordinate.
References castor::DataHolderT< RectangleData >::getData(), castor::RectangleData::rect, and castor::RectangleData::Mbr::right.

|
inline |
Retrieves the right coordinate.
References castor::DataHolderT< RectangleData >::getData(), castor::RectangleData::rect, and castor::RectangleData::Mbr::right.

| CU_API void castor::Rectangle::set | ( | int32_t | left, |
| int32_t | top, | ||
| int32_t | right, | ||
| int32_t | bottom ) |
sets the rectangle values
| [in] | left,top | Top left point |
| [in] | right,bottom | Right bottom point |
Retrieves the rectangle size.
| [out] | result | The rectangle size |
|
inline |
Retrieves the top coordinate.
References castor::DataHolderT< RectangleData >::getData(), castor::RectangleData::rect, and castor::RectangleData::Mbr::top.

|
inline |
Retrieves the top coordinate.
References castor::DataHolderT< RectangleData >::getData(), castor::RectangleData::rect, and castor::RectangleData::Mbr::top.
