|
C3D Toolkit
Kernel - 118057, Vision - 2.14.7.1821
|
Two-dimensional normalized vector. More...
#include <mb_vector.h>
Public Member Functions | |
| MbDirection () | |
| Default constructor. | |
| MbDirection (double _ax, double _ay) | |
| The constructor by coordinates. | |
| MbDirection (double a) | |
| Constructor by angle. | |
| MbDirection (const MbDirection &dir) | |
| Copy constructor. | |
| MbDirection (const MbCartPoint &p1, const MbCartPoint &p2) | |
| Constructor by two points. | |
| void | Rotate (double angle) |
| Rotate normalized vector by an angle 'angle'. | |
| void | Rotate (const MbDirection &) |
| Rotate vector by an angle that defined by direction. | |
| void | Transform (const MbMatrix &) |
| Transform according to matrix 'matr'. | |
| double | DirectionAngle () const |
| Calculate an angle by normalized vector. | |
| void | Calculate (const MbCartPoint &from, const MbCartPoint &to) |
| Calculate direction by two points. | |
| void | Normalize () |
| Normalize a vector. | |
| MbDirection | operator- () const |
| Unary minus. | |
| MbDirection | operator+ (const MbDirection &) const |
| Sum up two normalized vectors. | |
| MbDirection | operator~ () const |
| Find perpendicular to a normalized vector. | |
| void | Perpendicular () |
| Find perpendicular to a normalized vector. | |
| bool | operator== (const MbDirection &) const |
| Check for equality. | |
| bool | Equal (const MbDirection &) const |
| Check for equality. | |
| bool | operator!= (const MbDirection &) const |
| Check for inequality. | |
| bool | Colinear (const MbDirection &, double eps=Math::AngleEps) const |
| Check colinearity. | |
| bool | Orthogonal (const MbDirection &, double eps=Math::AngleEps) const |
| Check orthogonality. | |
| bool | Colinear (const MbVector &with, double eps=Math::AngleEps) const |
| Check colinearity. | |
| bool | Orthogonal (const MbVector &with, double eps=Math::AngleEps) const |
| Check orthogonality. | |
| void | Invert () |
| Change vector direction to opposite. | |
| void | operator= (double angle) |
| Assign value to vector by given angle. | |
| void | operator= (const MbVector &) |
| Assign value to vector by given vector. | |
| void | operator= (const MbCartPoint &) |
| Assign value to vector by given point. | |
| MbVector | operator* (double) const |
| Multiply vector by number. | |
| void | operator+= (const MbDirection &) |
| Sum up two vectors. | |
| void | operator-= (const MbDirection &) |
| Find the difference of vectors. | |
| double | operator* (const MbDirection &) const |
| Scalar product of two vectors. | |
| double | operator| (const MbDirection &) const |
| Vector product of two vectors. | |
| void | Init (double xx, double yy) |
| Initialize by coordinates. | |
| void | Init (const MbDirection &dir) |
| Initialize by coordinates of a vector. | |
| void | Set (double angle) |
| Initialize by given angle. | |
| int | Relative (const MbDirection &) const |
| Find vector location relative to current vector. | |
| bool | IsDegenerate (double lenEps=Math::LengthEps) const |
| Check for degeneracy. | |
| void | GetProperties (MbProperties &properties) |
| Get properties of the object. | |
| void | SetProperties (const MbProperties &properties) |
| Set properties of the object. | |
| bool | IsSame (const MbDirection &other, double accuracy) const |
| Are the objects equal? More... | |
Public Attributes | |
| double | ax |
| First component of vector. | |
| double | ay |
| Second component of vector. | |
Two-dimensional normalized vector.
Two-dimensional normalized vector. Defined algebraic and geometric operations for normalized vector and number or another vector.
|
inline |
Are the objects equal?
The objects are equal if their data are equal with a given accuracy.
| [in] | other | - The object to compare. |
| [in] | accuracy | - The accuracy to compare. |