synfig-core  1.0.3
Public Types | Public Member Functions | Static Public Member Functions | List of all members
synfig::Vector Class Reference

#include <vector.h>

Public Types

typedef Real value_type

Public Member Functions

 Vector ()
 Vector (const value_type &x, const value_type &y)
 Vector (const value_type &radius, const Angle &angle)
bool is_valid () const
bool is_nan_or_inf () const
value_typeoperator[] (const int &i)
const value_typeoperator[] (const int &i) const
const Vectoroperator+= (const Vector &rhs)
const Vectoroperator-= (const Vector &rhs)
const Vectoroperator*= (const value_type &rhs)
const Vectoroperator/= (const value_type &rhs)
Vector operator+ (const Vector &rhs) const
Vector operator- (const Vector &rhs) const
Vector operator* (const value_type &rhs) const
Vector operator/ (const value_type &rhs) const
Vector operator- () const
value_type operator* (const Vector &rhs) const
bool operator== (const Vector &rhs) const
bool operator!= (const Vector &rhs) const
value_type mag_squared () const
 Returns the squared magnitude of the vector.
value_type mag () const
 Returns the magnitude of the vector.
value_type inv_mag () const
 Returns the reciprocal of the magnitude of the vector.
Vector norm () const
 Returns a normalized version of the vector.
Vector perp () const
 Returns a perpendicular version of the vector.
Angle angle () const
bool is_equal_to (const Vector &rhs) const
Vector multiply_coords (const Vector &rhs) const
Vector divide_coords (const Vector &rhs) const
Vector one_divide_coords () const
Vector rotate (const Angle &rhs) const

Static Public Member Functions

static const Vector zero ()

Detailed Description

Todo:
writeme

Member Typedef Documentation

Constructor & Destructor Documentation

synfig::Vector::Vector ( )
inline
synfig::Vector::Vector ( const value_type x,
const value_type y 
)
inline
synfig::Vector::Vector ( const value_type radius,
const Angle angle 
)
inline

Member Function Documentation

bool synfig::Vector::is_valid ( ) const
inline

References isnan.

Referenced by synfig::Transformation::is_valid().

bool synfig::Vector::is_nan_or_inf ( ) const
inline

References isinf, and isnan.

value_type& synfig::Vector::operator[] ( const int &  i)
inline
const value_type& synfig::Vector::operator[] ( const int &  i) const
inline
const Vector& synfig::Vector::operator+= ( const Vector rhs)
inline
const Vector& synfig::Vector::operator-= ( const Vector rhs)
inline
const Vector& synfig::Vector::operator*= ( const value_type rhs)
inline
const Vector& synfig::Vector::operator/= ( const value_type rhs)
inline
Vector synfig::Vector::operator+ ( const Vector rhs) const
inline

References Vector().

Vector synfig::Vector::operator- ( const Vector rhs) const
inline

References Vector().

Vector synfig::Vector::operator* ( const value_type rhs) const
inline

References Vector().

Vector synfig::Vector::operator/ ( const value_type rhs) const
inline

References Vector().

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

References Vector().

value_type synfig::Vector::operator* ( const Vector rhs) const
inline
bool synfig::Vector::operator== ( const Vector rhs) const
inline
bool synfig::Vector::operator!= ( const Vector rhs) const
inline
value_type synfig::Vector::mag_squared ( ) const
inline
value_type synfig::Vector::mag ( ) const
inline
value_type synfig::Vector::inv_mag ( ) const
inline

Returns the reciprocal of the magnitude of the vector.

References mag_squared().

Referenced by InsideOut::get_cairocolor(), InsideOut::get_color(), InsideOut::hit_check(), and norm().

Vector synfig::Vector::norm ( ) const
inline

Returns a normalized version of the vector.

References inv_mag().

Referenced by synfig::Bone::get_shape(), synfig::Layer_Skeleton::sync(), Outline::sync(), Advanced_Outline::sync(), and CurveWarp::transform().

Vector synfig::Vector::perp ( ) const
inline
Angle synfig::Vector::angle ( ) const
inline
bool synfig::Vector::is_equal_to ( const Vector rhs) const
inline
static const Vector synfig::Vector::zero ( )
inlinestatic

References Vector().

Referenced by synfig::ValueNode_BLine::operator()().

Vector synfig::Vector::multiply_coords ( const Vector rhs) const
inline

References Vector().

Vector synfig::Vector::divide_coords ( const Vector rhs) const
inline

References Vector().

Vector synfig::Vector::one_divide_coords ( ) const
inline

References Vector().

Vector synfig::Vector::rotate ( const Angle rhs) const
inline

References Vector().


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