Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | Class Members

QS_VectorWrapper Class Reference

Wrapper class for vectors. More...

#include <qs_vectorwrapper.h>

List of all members.

Public Slots

QString toString () const
double getX () const
double getY () const
void setX (double x)
void setY (double y)
void setPolar (double radius, double angle)
 Sets the vector to the given polar coordinate.
double distanceTo (const QS_VectorWrapper *v) const
double angle () const
double angleTo (const QS_VectorWrapper *v) const
double magnitude () const
bool isInWindow (const QS_VectorWrapper *c1, const QS_VectorWrapper *c2)
 Checks if this vector lies within a rectangular area (window).
void move (const QS_VectorWrapper *offset)
 Moves this vector by the given offset.
void rotate (double cx, double cy, double ang)
void scale (double cx, double cy, double factor)

Public Member Functions

 QS_VectorWrapper (RS_Vector v)
 QS_VectorWrapper (double x, double y)
virtual RS_Vector getVector () const

Properties

double x
double y


Detailed Description

Wrapper class for vectors.


Member Function Documentation

double QS_VectorWrapper::angle  )  const [inline, slot]
 

Returns:
Angle of this vector in degrees.

double QS_VectorWrapper::angleTo const QS_VectorWrapper v  )  const [inline, slot]
 

Returns:
Angle from this vector to the given vector in degrees.

double QS_VectorWrapper::distanceTo const QS_VectorWrapper v  )  const [inline, slot]
 

Returns:
Distance from this vector to the given vector.

bool QS_VectorWrapper::isInWindow const QS_VectorWrapper c1,
const QS_VectorWrapper c2
[inline, slot]
 

Checks if this vector lies within a rectangular area (window).

Parameters:
c1 First corner of the window.
c2 Second corner of the window.
Return values:
true This vector is within the given window.
false This vector is not within the given window.

double QS_VectorWrapper::magnitude  )  const [inline, slot]
 

Returns:
Length of this vector.

void QS_VectorWrapper::setPolar double  radius,
double  angle
[inline, slot]
 

Sets the vector to the given polar coordinate.

Parameters:
radius Radius of the vector in the current graphics unit.
angle Angle in degrees.


The documentation for this class was generated from the following file:
Generated on Sat May 6 04:36:12 2006 for qcadscripting by  doxygen 1.4.4