ARB
Public Member Functions | Static Public Attributes | List of all members
AW::Angle Class Reference

#include <aw_position.hxx>

Collaboration diagram for AW::Angle:
Collaboration graph
[legend]

Public Member Functions

bool valid () const
 
 Angle (double Radian_)
 
 Angle (double x, double y)
 
 Angle (const Angle &a)
 
 Angle (const Vector &v)
 
 Angle (const LineVector &lv)
 
 Angle (const Vector &n, double r)
 
 Angle (const Position &p1, const Position &p2)
 
 Angle ()
 
Angleoperator= (const Angle &other)
 
Angleoperator= (const Vector &vec)
 
void fixRadian () const
 
const double & radian () const
 
double degrees () const
 
const Vectornormal () const
 
const double & sin () const
 
const double & cos () const
 
Angleoperator+= (const Angle &o)
 
Angleoperator-= (const Angle &o)
 
Angleoperator*= (const double &fact)
 
Anglerotate90deg ()
 
Anglerotate180deg ()
 
Anglerotate270deg ()
 
Angle operator- () const
 

Static Public Attributes

static const double rad2deg = 180/M_PI
 
static const double deg2rad = M_PI/180
 

Detailed Description

Definition at line 452 of file aw_position.hxx.

Constructor & Destructor Documentation

AW::Angle::Angle ( double  Radian_)
inlineexplicit

Definition at line 466 of file aw_position.hxx.

References ISVALID.

AW::Angle::Angle ( double  x,
double  y 
)
inline

Definition at line 467 of file aw_position.hxx.

References ISVALID, and AW::Vector::normalize().

AW::Angle::Angle ( const Angle a)
inline

Definition at line 468 of file aw_position.hxx.

References ISVALID.

AW::Angle::Angle ( const Vector v)
inlineexplicit

Definition at line 469 of file aw_position.hxx.

References ISVALID, and AW::Vector::normalize().

AW::Angle::Angle ( const LineVector lv)
inlineexplicit

Definition at line 470 of file aw_position.hxx.

References ISVALID, and AW::Vector::normalize().

AW::Angle::Angle ( const Vector n,
double  r 
)
inline

Definition at line 471 of file aw_position.hxx.

References aw_assert, AW::Vector::is_normalized(), and ISVALID.

AW::Angle::Angle ( const Position p1,
const Position p2 
)
inline

Definition at line 472 of file aw_position.hxx.

References ISVALID, and AW::Vector::normalize().

AW::Angle::Angle ( )
inline

Definition at line 473 of file aw_position.hxx.

Referenced by operator-().

Member Function Documentation

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

Definition at line 461 of file aw_position.hxx.

References is_nan_or_inf(), and AW::Vector::valid().

Angle& AW::Angle::operator= ( const Angle other)
inline

Definition at line 475 of file aw_position.hxx.

Angle& AW::Angle::operator= ( const Vector vec)
inline

Definition at line 476 of file aw_position.hxx.

References AW::Vector::normalize().

void AW::Angle::fixRadian ( ) const
inline

Definition at line 478 of file aw_position.hxx.

References M_PI.

Referenced by degrees(), operator*=(), and radian().

const double& AW::Angle::radian ( ) const
inline

Definition at line 483 of file aw_position.hxx.

References fixRadian().

double AW::Angle::degrees ( ) const
inline

Definition at line 484 of file aw_position.hxx.

References fixRadian().

const Vector& AW::Angle::normal ( ) const
inline
const double& AW::Angle::sin ( ) const
inline

Definition at line 487 of file aw_position.hxx.

References AW::Vector::y().

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

const double& AW::Angle::cos ( ) const
inline

Definition at line 488 of file aw_position.hxx.

References AW::Vector::x().

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

Angle& AW::Angle::operator+= ( const Angle o)
inline

Definition at line 490 of file aw_position.hxx.

References aw_assert, cos(), AW::Vector::length(), AW::nearlyEqual(), normal(), and sin().

Angle& AW::Angle::operator-= ( const Angle o)
inline

Definition at line 505 of file aw_position.hxx.

References aw_assert, cos(), AW::Vector::length(), AW::nearlyEqual(), normal(), and sin().

Angle& AW::Angle::operator*= ( const double &  fact)
inline

Definition at line 522 of file aw_position.hxx.

References fixRadian().

Angle& AW::Angle::rotate90deg ( )
inline

Definition at line 529 of file aw_position.hxx.

References M_PI, and AW::Vector::rotate90deg().

Referenced by calc_text_coordinates_aside_line().

Angle& AW::Angle::rotate180deg ( )
inline

Definition at line 530 of file aw_position.hxx.

References M_PI, and AW::Vector::rotate180deg().

Angle& AW::Angle::rotate270deg ( )
inline
Angle AW::Angle::operator- ( ) const
inline

Definition at line 533 of file aw_position.hxx.

References Angle(), and M_PI.

Member Data Documentation

const double AW::Angle::rad2deg = 180/M_PI
static

Definition at line 463 of file aw_position.hxx.

const double AW::Angle::deg2rad = M_PI/180
static

Definition at line 464 of file aw_position.hxx.


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