uicore::Pointx< Type > Class Template Reference

2D (x,y) point structure. More...

#include <point.h>

+ Inheritance diagram for uicore::Pointx< Type >:

Public Member Functions

 Pointx ()
 
 Pointx (Type x, Type y)
 
 Pointx (const Pointx< Type > &p)
 
 Pointx (const Vec2< Type > &p)
 
- Public Member Functions inherited from uicore::Vec2< Type >
 Vec2 ()
 
 Vec2 (const Type &scalar)
 
 Vec2 (const Vec3< Type > &copy)
 
 Vec2 (const Vec4< Type > &copy)
 
 Vec2 (const Type &p1, const Type &p2)
 
 Vec2 (const Type *array_xy)
 
 Vec2 (const Vec2< double > &copy)
 
 Vec2 (const Vec2< float > &copy)
 
 Vec2 (const Vec2< int > &copy)
 
template<>
 Vec2 (const Vec2< float > &copy)
 
template<>
 Vec2 (const Vec2< double > &copy)
 
template<>
 Vec2 (const Vec2< int > &copy)
 
template<>
 Vec2 (const Vec2< float > &copy)
 
template<>
 Vec2 (const Vec2< double > &copy)
 
template<>
 Vec2 (const Vec2< int > &copy)
 
template<>
 Vec2 (const Vec2< float > &copy)
 
template<>
 Vec2 (const Vec2< double > &copy)
 
template<>
 Vec2 (const Vec2< int > &copy)
 
template<>
 Vec2 (const Vec2< float > &copy)
 
template<>
 Vec2 (const Vec2< double > &copy)
 
template<>
 Vec2 (const Vec2< int > &copy)
 
template<>
 Vec2 (const Vec2< float > &copy)
 
template<>
 Vec2 (const Vec2< double > &copy)
 
template<>
 Vec2 (const Vec2< int > &copy)
 
template<>
 Vec2 (const Vec2< float > &copy)
 
template<>
 Vec2 (const Vec2< double > &copy)
 
template<>
 Vec2 (const Vec2< int > &copy)
 
template<>
 Vec2 (const Vec2< float > &copy)
 
template<>
 Vec2 (const Vec2< double > &copy)
 
template<>
 Vec2 (const Vec2< int > &copy)
 
template<>
 Vec2 (const Vec2< float > &copy)
 
template<>
 Vec2 (const Vec2< double > &copy)
 
template<>
 Vec2 (const Vec2< int > &copy)
 
Type angle (const Vec2< Type > &vector) const
 Calculate the angle between this vector and an other vector. More...
 
Type angle_line (const Vec2< Type > &point) const
 Calculate the angle of the line joining this point and other point. More...
 
Type angle_normed (const Vec2< Type > &vector) const
 Calculate the angle between this vector and an other vector, where the vectors are unit vectors. More...
 
Type distance (const Vec2< Type > &vector) const
 Calculate the distance between this vector and an other vector. More...
 
Type dot (const Vec2< Type > &vector) const
 Dot products this vector with an other vector. More...
 
bool is_equal (const Vec2< Type > &other, Type epsilon) const
 Returns true if equal within the bounds of an epsilon. More...
 
Type length () const
 Returns the length (magnitude) of this vector. More...
 
template<>
double length () const
 
template<>
float length () const
 
Vec2< Type > & normalize ()
 Normalizes this vector. More...
 
bool operator!= (const Vec2< Type > &vector) const
 != operator. More...
 
void operator*= (const Vec2< Type > &vector)
 *= operator. More...
 
void operator*= (Type value)
 *= operator. More...
 
void operator+= (const Vec2< Type > &vector)
 += operator. More...
 
void operator+= (Type value)
 += operator. More...
 
Vec2< Type > operator- () const
 
  • operator.
More...
 
void operator-= (const Vec2< Type > &vector)
 -= operator. More...
 
void operator-= (Type value)
 -= operator. More...
 
void operator/= (const Vec2< Type > &vector)
 /= operator. More...
 
void operator/= (Type value)
 /= operator. More...
 
bool operator< (const Vec2< Type > &vector) const
 < operator. More...
 
Vec2< Type > & operator= (const Vec2< Type > &vector)
 = operator. More...
 
bool operator== (const Vec2< Type > &vector) const
 == operator. More...
 
Vec2< Type > & rotate (const Vec2< Type > &hotspot, Type angle)
 Rotate this vector around another point. More...
 
Vec2< Type > & round ()
 Rounds all components of this vector. More...
 
Type round_value (float value) const
 Rounds a value for the datatype. More...
 

Additional Inherited Members

- Public Types inherited from uicore::Vec2< Type >
typedef Type datatype
 
- Static Public Member Functions inherited from uicore::Vec2< Type >
static Pointx< Type > calc_origin (Origin origin, const Sizex< Type > &size)
 Returns the anchor point for the origin within the dimensions of the size structure. More...
 
static Type dot (const Vec2< Type > &vector_1, const Vec2< Type > &vector_2)
 Dot products a vector with an other vector. More...
 
static bool is_equal (const Vec2< Type > &first, const Vec2< Type > &second, Type epsilon)
 Returns true if equal within the bounds of an epsilon. More...
 
static Vec2< Type > normalize (const Vec2< Type > &vector)
 Normalizes a vector. More...
 
static Vec2< Type > rotate (const Vec2< Type > &vector, const Vec2< Type > &hotspot, Type angle)
 Rotate a vector around another point. More...
 
static Vec2< Type > round (const Vec2< Type > &vector)
 Rounds all components on a vector. More...
 
- Public Attributes inherited from uicore::Vec2< Type >
Type x
 
Type y
 

Detailed Description

template<typename Type>
class uicore::Pointx< Type >

2D (x,y) point structure.

These point templates are defined for: int (Point), float (Pointf), double (Pointd)

Constructor & Destructor Documentation

template<typename Type>
uicore::Pointx< Type >::Pointx ( )
inline
template<typename Type>
uicore::Pointx< Type >::Pointx ( Type  x,
Type  y 
)
inline
template<typename Type>
uicore::Pointx< Type >::Pointx ( const Pointx< Type > &  p)
inline
template<typename Type>
uicore::Pointx< Type >::Pointx ( const Vec2< Type > &  p)
inline

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