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

#include <point.h>

+ Inheritance diagram for clan::Pointd:

Public Member Functions

 Pointd ()
 
 Pointd (const Pointx< double > &p)
 
 Pointd (const Vec2< double > &p)
 
 Pointd (double x, double y)
 
- Public Member Functions inherited from clan::Pointx< double >
 Pointx ()
 
 Pointx (const Pointx< double > &p)
 
 Pointx (const Vec2< double > &p)
 
 Pointx (double x, double y)
 
- Public Member Functions inherited from clan::Vec2< double >
 Vec2 ()
 
 Vec2 ()
 
 Vec2 (const double &p1, const double &p2)
 
 Vec2 (const double &p1, const double &p2)
 
 Vec2 (const double &scalar)
 
 Vec2 (const double &scalar)
 
 Vec2 (const double *array_xy)
 
 Vec2 (const double *array_xy)
 
 Vec2 (const Vec2< double > &copy)=default
 
 Vec2 (const Vec2< double > &copy)=default
 
 Vec2 (const Vec2< OtherType > &copy)
 
 Vec2 (const Vec2< OtherType > &copy)
 
 Vec2 (const Vec2< OtherType > &copy)
 
 Vec2 (const Vec2< OtherType > &copy)
 
 Vec2 (const Vec3< double > &copy)
 
 Vec2 (const Vec3< double > &copy)
 
 Vec2 (const Vec4< double > &copy)
 
 Vec2 (const Vec4< double > &copy)
 
Angle angle (const Vec2< double > &vector) const
 Calculate the angle between this vector and an other vector.
 
Angle angle (const Vec2< double > &vector) const
 Calculate the angle between this vector and an other vector.
 
Angle angle_line (const Vec2< double > &point) const
 Calculate the angle of the line joining this point and other point.
 
Angle angle_line (const Vec2< double > &point) const
 Calculate the angle of the line joining this point and other point.
 
Angle angle_normed (const Vec2< double > &vector) const
 Calculate the angle between this vector and an other vector, where the vectors are unit vectors.
 
Angle angle_normed (const Vec2< double > &vector) const
 Calculate the angle between this vector and an other vector, where the vectors are unit vectors.
 
double distance (const Vec2< double > &vector) const
 Calculate the distance between this vector and an other vector.
 
double distance (const Vec2< double > &vector) const
 Calculate the distance between this vector and an other vector.
 
double dot (const Vec2< double > &vector) const
 Dot products this vector with an other vector.
 
double dot (const Vec2< double > &vector) const
 Dot products this vector with an other vector.
 
bool is_equal (const Vec2< double > &other, double epsilon) const
 Returns true if equal within the bounds of an epsilon.
 
bool is_equal (const Vec2< double > &other, double epsilon) const
 Returns true if equal within the bounds of an epsilon.
 
double length () const
 Returns the length (magnitude) of this vector.
 
double length () const
 Returns the length (magnitude) of this vector.
 
double length () const
 
double length () const
 
float length () const
 
float length () const
 
Vec2< double > & normalize ()
 Normalizes this vector.
 
Vec2< double > & normalize ()
 Normalizes this vector.
 
bool operator!= (const Vec2< double > &vector) const
 != operator.
 
bool operator!= (const Vec2< double > &vector) const
 != operator.
 
void operator*= (const Vec2< double > &vector)
 *= operator.
 
void operator*= (const Vec2< double > &vector)
 *= operator.
 
void operator*= (double value)
 *= operator.
 
void operator*= (double value)
 *= operator.
 
void operator+= (const Vec2< double > &vector)
 += operator.
 
void operator+= (const Vec2< double > &vector)
 += operator.
 
void operator+= (double value)
 += operator.
 
void operator+= (double value)
 += operator.
 
Vec2< double > operator- () const
 
  • operator.

 
Vec2< double > operator- () const
 
  • operator.

 
void operator-= (const Vec2< double > &vector)
 -= operator.
 
void operator-= (const Vec2< double > &vector)
 -= operator.
 
void operator-= (double value)
 -= operator.
 
void operator-= (double value)
 -= operator.
 
void operator/= (const Vec2< double > &vector)
 /= operator.
 
void operator/= (const Vec2< double > &vector)
 /= operator.
 
void operator/= (double value)
 /= operator.
 
void operator/= (double value)
 /= operator.
 
bool operator< (const Vec2< double > &vector) const
 < operator.
 
bool operator< (const Vec2< double > &vector) const
 < operator.
 
Vec2< double > & operator= (const Vec2< double > &vector)=default
 = operator.
 
Vec2< double > & operator= (const Vec2< double > &vector)=default
 = operator.
 
bool operator== (const Vec2< double > &vector) const
 == operator.
 
bool operator== (const Vec2< double > &vector) const
 == operator.
 
Vec2< double > & rotate (const Vec2< double > &hotspot, const Angle &angle)
 Rotate this vector around another point.
 
Vec2< double > & rotate (const Vec2< double > &hotspot, const Angle &angle)
 Rotate this vector around another point.
 
Vec2< double > & round ()
 Rounds all components of this vector.
 
Vec2< double > & round ()
 Rounds all components of this vector.
 
double round_value (float value) const
 Rounds a value for the datatype.
 
double round_value (float value) const
 Rounds a value for the datatype.
 

Additional Inherited Members

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

Detailed Description

2D (x,y) point structure - Double

Constructor & Destructor Documentation

◆ Pointd() [1/4]

clan::Pointd::Pointd ( )
inline

◆ Pointd() [2/4]

clan::Pointd::Pointd ( double x,
double y )
inline

◆ Pointd() [3/4]

clan::Pointd::Pointd ( const Pointx< double > & p)
inline

◆ Pointd() [4/4]

clan::Pointd::Pointd ( const Vec2< double > & p)
inline

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