C3D Kernel  104598
Two-Dimensional Base Objects
Algorithm Objects
Collaboration diagram for Two-Dimensional Base Objects:

## Classes

class  MbCartPoint
The cartesian two-dimensional point. More...
class  MbHomogeneous
Extended point with homogeneous coordinates in the two-dimensional space. More...
class  MbMatrix
The extended matrix of transformation in a two-dimensional space. More...
class  MbPlacement
Local coordinate system in two dimensional space. More...
class  MbRect
Bounding rectangle. More...
class  MbVector
Two-dimensional vector. More...
class  MbDirection
Two-dimensional normalized vector. More...

## Enumerations

enum  MbeLocalSystemType { ls_CartesSystem, ls_PolarSystem }
enum  TaeTwoRectPos { rp_FirstInside, rp_SecondInside, rp_Intersect, rp_NoIntersect }

## Functions

template<typename ParamContainer , typename PointContainer >
void c3d::SplitHomoVector (const SArray< MbHomogeneous > &hList, PointContainer &uvList, ParamContainer *tList=NULL)
Separation of coordinates and weights.
void MulMatrix (const MbMatrix &m1, const MbMatrix &m2, MbMatrix &res)
Multiply matrices.
double Angle2Vectors (const MbVector &v1, const MbVector &v2)
Calculate minimal angle between two vectors.

## Enumeration Type Documentation

 enum MbeLocalSystemType

Types of local coordinate systems in two dimensional space.

Enumerator:
 ls_CartesSystem Cartesian coordinate system. ls_PolarSystem Polar coordinate system.
 enum TaeTwoRectPos

Possible locations of two bounding boxes relative to each other.

Enumerator:
 rp_FirstInside The first bounding box includes the second one. rp_SecondInside The second bounding box includes the first one. rp_Intersect Bounding boxes intersect. rp_NoIntersect Bounding boxes do not intersect.

## Function Documentation

template<typename ParamContainer , typename PointContainer >
 void c3d::SplitHomoVector ( const SArray< MbHomogeneous > & hList, PointContainer & uvList, ParamContainer * tList = `NULL` )

Separation of coordinates and weights.
Additional coordinate of a point (weight) is introduced for the convenience of working with non-uniform rational splines.

 void MulMatrix ( const MbMatrix & m1, const MbMatrix & m2, MbMatrix & res )

Multiply m1 matrix by m2 matrix (instead of res = m1 * m2).

Parameters:
 [in] m1,m2 - Initial matrices. [out] res - The required matrix.
 double Angle2Vectors ( const MbVector & v1, const MbVector & v2 ) ` [inline]`

Calculate angle between two vectors (-pi ... pi) Returns signed result:
<0 to the left of vector v1
>0 to the right of vector v2

Note:
Normalization of vectors is not required