|
|
| MbVector () |
| | Default constructor.
|
| |
|
| MbVector (double xx, double yy) |
| | The constructor by coordinates.
|
| |
|
| MbVector (const MbVector &dir) |
| | Copy constructor.
|
| |
|
| MbVector (const MbCartPoint &p1, const MbCartPoint &p2) |
| | The constructor by two points.
|
| |
|
| MbVector (const MbCartPoint &p) |
| | Constructor by point.
|
| |
|
| MbVector (double a) |
| | Constructor by angle.
|
| |
|
| MbVector (const MbDirection &dir) |
| | Constructor by unit vector of direction.
|
| |
|
MbVector & | Init (const MbCartPoint &p1, const MbCartPoint &p2) |
| | Initialize by given points.
|
| |
|
MbVector & | Init (double xx, double yy) |
| | Initialize by given coordinates.
|
| |
|
template<class Vector > |
| MbVector & | Init (const Vector &v) |
| | Initialize by given vector.
|
| |
|
MbVector & | SetZero () |
| | Set vector coordinates to zero.
|
| |
|
bool | operator== (const MbVector &with) const |
| | Check for equality.
|
| |
|
bool | Equal (const MbVector &with) const |
| | Check for equality.
|
| |
|
bool | operator!= (const MbVector &with) const |
| | Check for inequality.
|
| |
|
double | Length () const |
| | Calculate vector length.
|
| |
|
double | Length2 () const |
| | Calculate vector length square.
|
| |
|
bool | Normalize () |
| | Normalize a vector.
|
| |
|
MbVector | GetNormalized () const |
| | Return normalized copy of vector.
|
| |
|
MbVector & | Rotate (double angle) |
| | Rotate vector by an angle 'angle'.
|
| |
|
MbVector & | Rotate (const MbDirection &angle) |
| | Rotate vector by an angle that defined by direction.
|
| |
|
MbVector & | Transform (const MbMatrix &matr) |
| | Transform according to matrix 'matr'.
|
| |
|
double | DirectionAngle () const |
| | Calculate an angle by normalized vector.
|
| |
|
MbVector | operator+ (const MbVector &) const |
| | Sum up two vectors.
|
| |
|
MbVector | operator+ (const MbCartPoint &) const |
| | Sum up vector and point.
|
| |
|
MbVector | operator- (const MbVector &) const |
| | Subtract vector from vector.
|
| |
|
MbVector | operator- (const MbCartPoint &) const |
| | Subtract point from vector.
|
| |
|
MbVector | operator- () const |
| | Unary minus.
|
| |
|
MbVector | operator* (double factor) const |
| | Multiply vector by number.
|
| |
|
MbVector | operator/ (double factor) const |
| | Divide vector by number.
|
| |
|
MbVector & | operator+= (const MbVector &) |
| | Sum up two vectors.
|
| |
|
MbVector & | operator-= (const MbVector &) |
| | Subtract vector from vector.
|
| |
|
MbVector & | operator*= (double) |
| | Multiply vector by number.
|
| |
|
MbVector & | operator/= (double) |
| | Divide vector by number.
|
| |
|
double | operator* (const MbVector &) const |
| | Scalar product of two vectors.
|
| |
|
double | operator* (const MbDirection &) const |
| | Scalar product of two vectors.
|
| |
|
double | operator| (const MbVector &) const |
| | Vector product of two vectors.
|
| |
|
MbVector | operator* (const MbMatrix &) const |
| | Calculate the vector as this copy transformed by the matrix.
|
| |
|
MbVector & | Perpendicular () |
| | Makes a vector orthogonal to itself, namely sets the vector (-y, x).
|
| |
|
MbVector | operator~ () const |
| | Returns a vector orthogonal to this vector, namely the vector (-y, x).
|
| |
|
MbVector & | operator= (const MbVector &) |
| | Assign the value of another vector to the vector.
|
| |
|
MbVector & | operator= (const MbCartPoint &) |
| | Assign point coordinate values to vector.
|
| |
|
MbVector & | operator= (const MbHomogeneous &) |
| | Assign uniform point coordinate values to vector.
|
| |
|
MbVector & | operator= (const MbDirection &) |
| | Assign normalized vector values to vector.
|
| |
|
double & | operator[] (size_t i) |
| | Access to a coordinate by an index.
|
| |
|
double | operator[] (size_t i) const |
| | The value of a coordinate by an index.
|
| |
|
int | Relative (const MbVector &) const |
| | Give vector location relative to current vector.
|
| |
|
bool | IsZero (double eps) const |
| | Check if vector is zero.
|
| |
|
bool | IsDegenerate (double lenEps=Math::LengthEps) const |
| | Check for degeneracy.
|
| |
|
bool | IsNormalized (double eps=LENGTH_EPSILON) const |
| | Check if vector is normalized.
|
| |
|
bool | RoundColinear (const MbVector &with, double eps=Math::paramNear) const |
| | Check colinearity by dot product.
|
| |
|
bool | Colinear (const MbVector &with, double eps=Math::AngleEps) const |
| | Check colinearity.
|
| |
|
bool | Orthogonal (const MbVector &with, double eps=Math::AngleEps) const |
| | Check orthogonality.
|
| |
|
bool | operator|| (const MbVector &with) const |
| | Check colinearity.
|
| |
|
void | Invert () |
| | Change vector direction to opposite.
|
| |
|
void | Scale (double sx, double sy) |
| | Scale components of vector.
|
| |
|
void | Set (const MbVector &v1, double t1) |
| | Equate vector with vector v1 multiplied by t1.
|
| |
|
void | Set (const MbVector &v1, double t1, const MbVector &v2, double t2) |
| | Equate vector with sum of vectors v1 and v2 multiplied with t1 and t2 correspondingly.
|
| |
|
void | Set (const MbVector &v1, double t1, const MbVector &v2, double t2, const MbVector &v3, double t3) |
| | Equate vector with sum of vectors v1, v2 and v3 multiplied with t1, t2 and t3 correspondingly.
|
| |
|
void | Set (const MbVector &v1, double t1, const MbVector &v2, double t2, const MbVector &v3, double t3, const MbVector &v4, double t4) |
| | Equate vector with sum of vectors v1, v2, v3 and v4 multiplied with t1, t2, t3 and t4 correspondingly.
|
| |
|
void | Set (const MbDirection &v1, double t1, const MbDirection &v2, double t2) |
| | Equate vector with sum of normalized vectors v1 and v2 multiplied with t1 and t2 correspondingly.
|
| |
|
void | Set (const MbCartPoint &v1, double t1, const MbCartPoint &v2, double t2) |
| | Equate vector coordinates with sum of points v1 and v2 multiplied with t1 and t2 correspondingly.
|
| |
|
void | Set (const MbCartPoint &v1, double t1, const MbCartPoint &v2, double t2, const MbCartPoint &v3, double t3) |
| | Equate vector coordinates with coordinates of sum of vectors v1, v2 and v3 multiplied with t1, t2 and t3 correspondingly.
|
| |
|
void | Set (const MbCartPoint &v1, double t1, const MbCartPoint &v2, double t2, const MbCartPoint &v3, double t3, const MbCartPoint &v4, double t4) |
| | Equate vector coordinates with coordinates of sum of points v1, v2, v3 and v4 multiplied with t1, t2, t3 and t4 correspondingly.
|
| |
|
void | Add (const MbVector &v1, double t1) |
| | Add vector v1 multiplied by t1 to a vector.
|
| |
|
void | Add (const MbVector &v1, double t1, const MbVector &v2, double t2) |
| | Add sum of vectors v1 and v2 multiplied with t1 and t2 correspondingly to a vector.
|
| |
|
void | Add (const MbVector &v1, double t1, const MbVector &v2, double t2, const MbVector &v3, double t3) |
| | Add sum of vectors v1, v2 and v3 multiplied with t1, t2 and t3 correspondingly to a vector.
|
| |
|
void | Add (const MbVector &v1, double t1, const MbVector &v2, double t2, const MbVector &v3, double t3, const MbVector &v4, double t4) |
| | Add sum of vectors v1, v2, v3 and v4 multiplied with t1, t2, t3 and t4 correspondingly to a vector.
|
| |
|
void | Add (const MbDirection &v1, double t1, const MbDirection &v2, double t2) |
| | Add sum of unit vectors v1 and v2 multiplied with t1 and t2 correspondingly to a vector.
|
| |
|
double | MaxFactor () const |
| | Give the largest absolute value of a vector.
|
| |
|
void | GetProperties (MbProperties &properties) |
| | Get properties of the object.
|
| |
|
void | SetProperties (const MbProperties &properties) |
| | Set properties of the object.
|
| |
| bool | IsSame (const MbVector &other, double accuracy) const |
| | Are the objects equal? More...
|
| |
Two-dimensional vector.
Two-dimensional vector. Defined algebraic and geometric operations for vector and number, point or another vector.