|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
The class Rectangle2dC represents a geometrical object
Typedefs:
- typedef RealT AreaT;
-
- typedef RealT LengthT;
-
- typedef RealT FeatureT;
-
Variables:
- Point2dC origin;
-
The position of one vertex of the rectangle
- Vector2dC dir;
-
The direction of the first side using
counter-clockwise order.
- LengthT side[];
-
The lengths of both sides of the rectangle.
side[0] is the length of the first side.
Methods:
- Rectangle2dC()
-
Creates the empty rectangle in the origin of coordinate system.
- Rectangle2dC(const Point2dC & a,const Point2dC & b,const Point2dC & c)
-
Creates the rectangle. The point 'a' is taken as the origin
of the rectangle. The vector b-a is taken as the first side.
The point 'c' is used for computation of the length of the second
side. The length of the second side is the projection of the
vector c-a into the vector perpendicular to the vector b-a.
- const Point2dC & Origin() const
-
Returns the first point of the rectangle.
- const Vector2dC & Direction() const
-
Returns the direction of the first side of the rectangle as a vector.
- LengthT SideA() const
-
Returns the size of the first side of the rectangle.
- LengthT SideB() const
-
Returns the size of the second side of the rectangle.
- LengthT BiggerSide() const
-
Returns the size of the bigger side of the rectangle.
- LengthT SmallerSide() const
-
Returns the size of the smaller side of the rectangle.
- AreaT Area() const
-
Returns the area of the rectangle.
- Vector2dC::AngleT PrincipalAngle() const
-
Returns the oriented angle (rad) between the axis x and the longer side
of the rectangle.
- FeatureT NonElongatedness() const
-
Returns the ratio SmallerSide() and BiggerSide() expressing
elongatedness of the rectangle. The value 1 means the rectangle
is square, the value limiting to 0 implies long rectangle.
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|