ARB
Public Member Functions | List of all members
AW::Vector Class Reference

#include <aw_position.hxx>

Public Member Functions

bool valid () const
 
 Vector ()
 
 Vector (const double &X, const double &Y)
 
 Vector (const double &X, const double &Y, const double &Length)
 
 Vector (const Position &to)
 
 Vector (const Position &from, const Position &to)
 
 ~Vector ()
 
const double & x () const
 
const double & y () const
 
const Positionendpoint () const
 
Vectorset (const double &X, const double &Y, double Length=-1)
 
Vectorsetx (const double &X)
 
Vectorsety (const double &Y)
 
const double & length () const
 
Vectoroperator*= (const double &factor)
 
Vectoroperator/= (const double &divisor)
 
Vectoroperator+= (const Vector &other)
 
Vectoroperator-= (const Vector &other)
 
Vectornormalize ()
 
bool is_normalized () const
 
bool has_length () const
 
Vectorset_length (double new_length)
 
Vectorneg ()
 
Vectornegx ()
 
Vectornegy ()
 
Vectorflipxy ()
 
Vectorrotate90deg ()
 
Vectorrotate180deg ()
 
Vectorrotate270deg ()
 
Vectorrotate45deg ()
 
Vectorrotate135deg ()
 
Vectorrotate225deg ()
 
Vectorrotate315deg ()
 
Vector operator- () const
 

Detailed Description

Definition at line 146 of file aw_position.hxx.

Constructor & Destructor Documentation

AW::Vector::Vector ( )
inline

Definition at line 153 of file aw_position.hxx.

Referenced by operator-().

AW::Vector::Vector ( const double &  X,
const double &  Y 
)
inline

Definition at line 154 of file aw_position.hxx.

References ISVALID.

AW::Vector::Vector ( const double &  X,
const double &  Y,
const double &  Length 
)
inline

Definition at line 155 of file aw_position.hxx.

References ISVALID.

AW::Vector::Vector ( const Position to)
inlineexplicit

Definition at line 156 of file aw_position.hxx.

References ISVALID.

AW::Vector::Vector ( const Position from,
const Position to 
)
inline

Definition at line 157 of file aw_position.hxx.

References ISVALID.

AW::Vector::~Vector ( )
inline

Definition at line 158 of file aw_position.hxx.

Member Function Documentation

bool AW::Vector::valid ( ) const
inline

Definition at line 151 of file aw_position.hxx.

References is_nan(), and AW::Position::valid().

Referenced by AW::LineVector::valid(), and AW::Angle::valid().

const double& AW::Vector::x ( ) const
inline
const double& AW::Vector::y ( ) const
inline
const Position& AW::Vector::endpoint ( ) const
inline

Definition at line 162 of file aw_position.hxx.

Referenced by AW::nearlyEqual().

Vector& AW::Vector::set ( const double &  X,
const double &  Y,
double  Length = -1 
)
inline

Definition at line 164 of file aw_position.hxx.

Referenced by operator*=(), operator+=(), and operator-=().

Vector& AW::Vector::setx ( const double &  X)
inline

Definition at line 165 of file aw_position.hxx.

References AW::Position::setx().

Vector& AW::Vector::sety ( const double &  Y)
inline

Definition at line 166 of file aw_position.hxx.

References AW::Position::sety().

Referenced by calc_text_coordinates_near_tip().

const double& AW::Vector::length ( ) const
inline
Vector& AW::Vector::operator*= ( const double &  factor)
inline

Definition at line 175 of file aw_position.hxx.

References abs, length(), set(), x(), and y().

Referenced by operator/=().

Vector& AW::Vector::operator/= ( const double &  divisor)
inline

Definition at line 176 of file aw_position.hxx.

References operator*=().

Vector& AW::Vector::operator+= ( const Vector other)
inline

Definition at line 178 of file aw_position.hxx.

References set(), x(), and y().

Vector& AW::Vector::operator-= ( const Vector other)
inline

Definition at line 179 of file aw_position.hxx.

References set(), x(), and y().

Vector& AW::Vector::normalize ( )
inline

Definition at line 181 of file aw_position.hxx.

References aw_assert, and length().

Referenced by AW::Angle::Angle(), AW::normalized(), and AW::Angle::operator=().

bool AW::Vector::is_normalized ( ) const
inline

Definition at line 185 of file aw_position.hxx.

References length(), and AW::nearlyEqual().

Referenced by AW::Angle::Angle(), and SEC_oriented::set_abs_angle().

bool AW::Vector::has_length ( ) const
inline
Vector& AW::Vector::set_length ( double  new_length)
inline

Definition at line 188 of file aw_position.hxx.

References length().

Referenced by SEC_root::paintAnnotation().

Vector& AW::Vector::neg ( )
inline

Definition at line 195 of file aw_position.hxx.

References x(), and y().

Referenced by rotate180deg().

Vector& AW::Vector::negx ( )
inline

Definition at line 196 of file aw_position.hxx.

References AW::Position::setx(), and x().

Referenced by rotate270deg().

Vector& AW::Vector::negy ( )
inline

Definition at line 197 of file aw_position.hxx.

References AW::Position::sety(), and y().

Referenced by rotate90deg().

Vector& AW::Vector::flipxy ( )
inline

Definition at line 199 of file aw_position.hxx.

References x(), and y().

Referenced by rotate270deg(), and rotate90deg().

Vector& AW::Vector::rotate90deg ( )
inline
Vector& AW::Vector::rotate180deg ( )
inline

Definition at line 202 of file aw_position.hxx.

References neg().

Referenced by AW::Angle::rotate180deg(), and rotate225deg().

Vector& AW::Vector::rotate270deg ( )
inline
Vector & Vector::rotate45deg ( )

Definition at line 51 of file AW_position.cxx.

References rotate90deg().

Referenced by rotate135deg(), rotate225deg(), and rotate315deg().

Vector& AW::Vector::rotate135deg ( )
inline

Definition at line 206 of file aw_position.hxx.

References rotate45deg(), and rotate90deg().

Vector& AW::Vector::rotate225deg ( )
inline

Definition at line 207 of file aw_position.hxx.

References rotate180deg(), and rotate45deg().

Vector& AW::Vector::rotate315deg ( )
inline

Definition at line 208 of file aw_position.hxx.

References rotate270deg(), and rotate45deg().

Vector AW::Vector::operator- ( ) const
inline

Definition at line 210 of file aw_position.hxx.

References Vector(), x(), and y().


The documentation for this class was generated from the following files: