2D object configuration. More...
#include <robj2dconfig.h>
Public Member Functions | |
RObj2DConfig (RObj2D *obj, tOrientation ori) | |
int | Compare (const RObj2DConfig &obj) const |
int | Compare (const tOrientation ori) const |
void | Set (const RPolygon &poly) |
void | Set (RContainer< RRect, false, false > &rects) |
tCoord | GetWidth (void) const |
tCoord | GetHeight (void) const |
tCoord | GetArea (void) |
tOrientation | GetOrientation (void) const |
const RPolygon & | GetPolygon (void) const |
RCursor< RObj2DConfigConnector > | GetConnectors (void) const |
RCursor< RRect > | GetRects (void) const |
void | Add (RObj2DConfigConnector *con) |
RObj2DConfigConnector * | GetConnector (RObj2DConnector *con) const |
RObj2DConfigConnector * | GetConnector (const RString &con) const |
Private Attributes | |
RObj2D * | Obj |
RPolygon | Polygon |
RRects | Rects |
RRect | Rect |
tOrientation | Orientation |
RContainer < RObj2DConfigConnector, true, true > | Connectors |
tCoord | Area |
Detailed Description
2D object configuration.
The RObj2DConfig provides a representation for a particular configuration of an object.
Constructor & Destructor Documentation
RObj2DConfig | ( | RObj2D * | obj, |
tOrientation | ori | ||
) |
Constructor.
- Parameters
-
obj Object. ori Orientation.
Member Function Documentation
int Compare | ( | const RObj2DConfig & | obj | ) | const |
Compare two configuration of object.
- Parameters
-
obj Configuration to compare with.
- Returns
- a value used by RContainer.
int Compare | ( | const tOrientation | ori | ) | const |
Compare the current configuration with a possible orientation.
- Parameters
-
ori Orientation
- Returns
- a value used by RContainer.
void Set | ( | const RPolygon & | poly | ) |
Set the polygon. The area and the decomposition in rectangles are computed.
- Parameters
-
poly Polygon.
void Set | ( | RContainer< RRect, false, false > & | rects | ) |
Set the rectangles corresponding to the decomposition of the polygon. The area is computed.
- Parameters
-
rects Rectangles. The container is emptied by this method.
tCoord GetWidth | ( | void | ) | const |
Return the Width of the object represented.
tCoord GetHeight | ( | void | ) | const |
Return the Height of the object represented.
tCoord GetArea | ( | void | ) |
Return the area of the object.
tOrientation GetOrientation | ( | void | ) | const |
- Returns
- the orientation of the configuration.
const RPolygon& GetPolygon | ( | void | ) | const |
- Returns
- the polygon.
RCursor<RObj2DConfigConnector> GetConnectors | ( | void | ) | const |
- Returns
- a cursor over the connectors.
- Returns
- a cursor over the rectangles representing the decomposition of the polygon.
void Add | ( | RObj2DConfigConnector * | con | ) |
Add a connector to the configuration.
- Parameters
-
con Connector.
RObj2DConfigConnector* GetConnector | ( | RObj2DConnector * | con | ) | const |
- Returns
- the actual configuration of a given connector.
- Parameters
-
con Connector.
RObj2DConfigConnector* GetConnector | ( | const RString & | con | ) | const |
- Returns
- the actual configuration of a given connector.
- Parameters
-
con Name of the connector.
Member Data Documentation
|
private |
The object.
|
private |
Polygon representing the object.
|
private |
Rectangular decompositions of the polygon.
|
private |
Rectangle holding the polygon.
|
private |
Orientation.
|
private |
The connectors of this object.
|
private |
Represent the area of the object.