Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::Vector_2D< F > Class Template Reference

#include <hps.h>

Collaboration diagram for HPS::Vector_2D< F >:

Public Member Functions

 Vector_2D ()
 
 Vector_2D (F v1, F v2)
 
template<typename D >
 Vector_2D (Vector_2D< D > const &that)
 
 Vector_2D (Vector_3D< F > const &that)
 
 Vector_2D (Point_2D< F > const &p)
 
 Vector_2D (Plane_2D< F > const &p)
 
Vector_2D const operator- () const
 
bool operator== (Vector_2D const &v) const
 
bool operator!= (Vector_2D const &v) const
 
bool Equals (Vector_2D const &v, int in_tolerance=32) const
 
Vector_2Doperator+= (Vector_2D const &v)
 
Vector_2Doperator-= (Vector_2D const &v)
 
Vector_2D const operator+ (Vector_2D const &v) const
 
Vector_2D const operator- (Vector_2D const &v) const
 
Vector_2Doperator*= (F s)
 
Vector_2Doperator/= (F s)
 
Vector_2D const operator* (F s) const
 
Vector_2D const operator/ (F s) const
 
Foperator[] (size_t i)
 
F const & operator[] (size_t i) const
 
HPS_INLINE double Length () const
 
HPS_INLINE double LengthSquared () const
 
HPS_INLINE Vector_2DNormalize (bool check_range=false, F epsilon=Float_Traits< F >::Epsilon())
 
HPS_INLINE Vector_2DNormalize (F epsilon)
 
HPS_INLINE F Magnitude () const
 
HPS_INLINE F Manhattan () const
 
HPS_INLINE F Dot (Vector_2D const &v) const
 
HPS_INLINE F Cross (Vector_2D const &v) const
 
HPS_INLINE Vector_2D Scale (Vector_2D const &v) const
 

Static Public Member Functions

static HPS_INLINE Vector_2D XAxis ()
 
static HPS_INLINE Vector_2D YAxis ()
 
static HPS_INLINE Vector_2D Zero ()
 
static HPS_INLINE Vector_2D Unit ()
 

Public Attributes

F x
 
F y
 

Constructor & Destructor Documentation

◆ Vector_2D() [1/6]

template<typename F>
HPS::Vector_2D< F >::Vector_2D ( )
inline

◆ Vector_2D() [2/6]

template<typename F>
HPS::Vector_2D< F >::Vector_2D ( F  v1,
F  v2 
)
inline

◆ Vector_2D() [3/6]

template<typename F>
template<typename D >
HPS::Vector_2D< F >::Vector_2D ( Vector_2D< D > const &  that)
inlineexplicit

◆ Vector_2D() [4/6]

template<typename F>
HPS::Vector_2D< F >::Vector_2D ( Vector_3D< F > const &  that)
inlineexplicit

◆ Vector_2D() [5/6]

template<typename F>
HPS::Vector_2D< F >::Vector_2D ( Point_2D< F > const &  p)
inlineexplicit

◆ Vector_2D() [6/6]

template<typename F >
HPS::Vector_2D< F >::Vector_2D ( Plane_2D< F > const &  p)
explicit

Member Function Documentation

◆ Cross()

template<typename F>
HPS_INLINE F HPS::Vector_2D< F >::Cross ( Vector_2D< F > const &  v) const
inline

◆ Dot()

template<typename F>
HPS_INLINE F HPS::Vector_2D< F >::Dot ( Vector_2D< F > const &  v) const
inline

◆ Equals()

template<typename F>
bool HPS::Vector_2D< F >::Equals ( Vector_2D< F > const &  v,
int  in_tolerance = 32 
) const
inline

◆ Length()

template<typename F>
HPS_INLINE double HPS::Vector_2D< F >::Length ( ) const
inline
Here is the caller graph for this function:

◆ LengthSquared()

template<typename F>
HPS_INLINE double HPS::Vector_2D< F >::LengthSquared ( ) const
inline

◆ Magnitude()

template<typename F>
HPS_INLINE F HPS::Vector_2D< F >::Magnitude ( ) const
inline
Here is the call graph for this function:

◆ Manhattan()

template<typename F>
HPS_INLINE F HPS::Vector_2D< F >::Manhattan ( ) const
inline
Here is the call graph for this function:

◆ Normalize() [1/2]

template<typename F>
HPS_INLINE Vector_2D& HPS::Vector_2D< F >::Normalize ( bool  check_range = false,
F  epsilon = Float_Traits<F>::Epsilon() 
)
inline
Here is the call graph for this function:

◆ Normalize() [2/2]

template<typename F>
HPS_INLINE Vector_2D& HPS::Vector_2D< F >::Normalize ( F  epsilon)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

template<typename F>
bool HPS::Vector_2D< F >::operator!= ( Vector_2D< F > const &  v) const
inline

◆ operator*()

template<typename F>
Vector_2D const HPS::Vector_2D< F >::operator* ( F  s) const
inline

◆ operator*=()

template<typename F>
Vector_2D& HPS::Vector_2D< F >::operator*= ( F  s)
inline

◆ operator+()

template<typename F>
Vector_2D const HPS::Vector_2D< F >::operator+ ( Vector_2D< F > const &  v) const
inline

◆ operator+=()

template<typename F>
Vector_2D& HPS::Vector_2D< F >::operator+= ( Vector_2D< F > const &  v)
inline

◆ operator-() [1/2]

template<typename F>
Vector_2D const HPS::Vector_2D< F >::operator- ( ) const
inline

◆ operator-() [2/2]

template<typename F>
Vector_2D const HPS::Vector_2D< F >::operator- ( Vector_2D< F > const &  v) const
inline

◆ operator-=()

template<typename F>
Vector_2D& HPS::Vector_2D< F >::operator-= ( Vector_2D< F > const &  v)
inline

◆ operator/()

template<typename F>
Vector_2D const HPS::Vector_2D< F >::operator/ ( F  s) const
inline
Here is the call graph for this function:

◆ operator/=()

template<typename F>
Vector_2D& HPS::Vector_2D< F >::operator/= ( F  s)
inline

◆ operator==()

template<typename F>
bool HPS::Vector_2D< F >::operator== ( Vector_2D< F > const &  v) const
inline

◆ operator[]() [1/2]

template<typename F>
F& HPS::Vector_2D< F >::operator[] ( size_t  i)
inline

◆ operator[]() [2/2]

template<typename F>
F const& HPS::Vector_2D< F >::operator[] ( size_t  i) const
inline

◆ Scale()

template<typename F>
HPS_INLINE Vector_2D HPS::Vector_2D< F >::Scale ( Vector_2D< F > const &  v) const
inline

◆ Unit()

template<typename F>
static HPS_INLINE Vector_2D HPS::Vector_2D< F >::Unit ( )
inlinestatic

◆ XAxis()

template<typename F>
static HPS_INLINE Vector_2D HPS::Vector_2D< F >::XAxis ( )
inlinestatic

◆ YAxis()

template<typename F>
static HPS_INLINE Vector_2D HPS::Vector_2D< F >::YAxis ( )
inlinestatic

◆ Zero()

template<typename F>
static HPS_INLINE Vector_2D HPS::Vector_2D< F >::Zero ( )
inlinestatic

Member Data Documentation

◆ x

template<typename F>
F HPS::Vector_2D< F >::x

◆ y

template<typename F>
F HPS::Vector_2D< F >::y

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