MKI_VECTOR (Basic Classes) Changed in Version 2026.1

www.CAD6.com

This class contains the description of a 2D vector.

 

C++ Syntax

class MKI_VECTOR

{

  public:

 

  double vx,

         vy;

 

  MKI_VECTOR( void );

 

  MKI_VECTOR(

 const MKI_VECTOR* f_pThis );

 

  MKI_VECTOR(

 const double f_dX,

 const double f_dY );

 

  MKI_VECTOR(

 const MKI_POINT& f_rPoint1,

 const MKI_POINT& f_rPoint2 );

 

  bool

  operator ==(

 const MKI_VECTOR& f_rVector ) const;

 

  bool

  operator !=(

 const MKI_VECTOR& f_rVector ) const;

 

  void

  SetZero( void );

 

  bool

  IsZero( void ) const;

 

  bool

  IsNonZero( void ) const;

 

  void

  SetInvalid( void );

 

  bool

  IsValid( void ) const;

 

  bool

  IsInvalid( void ) const;

 

  void

  Set(

 const double f_dX,

 const double f_dY );

 

  void

  Set(

 const MKI_POINT& f_rPoint );

 

  void

  Add(

 const double f_dX,

 const double f_dY );

 

  void

  Add(

 const MKI_VECTOR& f_rVector );

 

  void

  Add(

 const double f_dFactor,

 const MKI_VECTOR& f_rVector );

 

  void

  SetAdd(

 const MKI_VECTOR& f_rVector1,

 const MKI_VECTOR& f_rVector2 );

 

  void

  SetAdd(

 const MKI_VECTOR& f_rVector1,

 const double f_dFactor,

 const MKI_VECTOR& f_rVector2 );

 

  void

  Sub(

 const double f_dX,

 const double f_dY );

 

  void

  Sub(

 const MKI_VECTOR& f_rVector );

 

  void

  SetSub(

 const MKI_VECTOR& f_rVector1,

 const MKI_VECTOR& f_rVector2 );

 

  void

  SetSub(

 const MKI_POINT& f_rPoint1,

 const MKI_POINT& f_rPoint2 );

 

  void

  Divide(

 const double f_dFactor );

 

  void

  Multiply(

 const double f_dFactor );

 

  void

  Multiply(

 const MKI_MATRIX& f_rMatrix );

 

  void

  SetMultiply(

 const double f_dFactor,

 const MKI_VECTOR& f_rVector );

 

  void

  SetMultiply(

 const MKI_MATRIX& f_rMatrix,

 const MKI_VECTOR& f_rVector );

 

  void

  SetMultiply(

 const MKI_MATRIX& f_rMatrix,

 const double f_dX,

 const double f_dY ); New in Version 2026.1

 

  void

  Rotate(

 const double f_dAngle );

 

  void

  SetRotate(

 const double f_dAngle,

 const MKI_VECTOR& f_rVector );

 

  double

  Scalar(

 const MKI_VECTOR& f_rVector ) const;

 

  double

  Determinant(

 const MKI_VECTOR& f_rVector ) const;

 

  double

  Square( void ) const;

 

  double

  Length( void ) const;

 

  double

  Normalize( void );

 

  double

  SetLength(

 double f_dLength );

 

  double

  Angle( void ) const;

 

  double

  AngleTo(

 const MKI_VECTOR& f_rVector ) const; New in Version 2022.1

};

 

Element Description

vx

vy

[double] X- and Y-component of the vector. The components are in [mm].

 

MKD Syntax

vx,vy

 

The data type MKI_VECTOR is used to store the components of a vector. Each MKI_VECTOR consists of a X- and a Y-component.

 

CAD6interface 2026.1 - Copyright 2026 Malz++Kassner® GmbH