feisty meow concerns codebase  2.140
geometric::cartesian_point Class Reference

Provides a geometric point that use double floating points numbers. More...

#include <cartesian_objects.h>

Inheritance diagram for geometric::cartesian_point:
Collaboration diagram for geometric::cartesian_point:

Public Member Functions

 cartesian_point (double x=0, double y=0)
 
 cartesian_point (double r, double_angle theta)
 
 cartesian_point (const point< double > &to_copy)
 
 DEFINE_CLASS_NAME ("cartesian_point")
 
- Public Member Functions inherited from geometric::point< double >
 point (double x=0, double y=0)
 
 point (double r, double_angle theta)
 
 DEFINE_CLASS_NAME ("point")
 
void set (double x, double y)
 
void set (double r, double_angle theta)
 
double x () const
 
double y () const
 
double r () const
 
double_angle theta () const
 
point rotate (const double_angle &theta) const
 Rotates the point by the angle "theta". More...
 
double distance (const point &p2) const
 Returns the distance between ‘this’ and the second point ‘p2’. More...
 
point operator- () const
 return the additive inverse of the vector More...
 
point operator- (const point &arg2) const
 
double magnitude () const
 return the distance from the origin to this point. More...
 
point operator+ (const point &arg2) const
 
pointoperator+= (const point &arg2)
 
pointoperator-= (const point &arg2)
 
bool operator== (const point &arg2) const
 
basis::astring text_form () const
 Prints out the two values (x and y) held in the point. More...
 
bool from_text (const basis::astring &text)
 returns true if the "text" is successfully pulled into this point. More...
 
virtual void pack (basis::byte_array &packed_form) const
 Creates a packed form of the packable object in "packed_form". More...
 
virtual bool unpack (basis::byte_array &packed_form)
 Restores the packable from the "packed_form". More...
 
int packed_size () const
 Estimates the space needed for the packed structure. More...
 

Static Public Member Functions

static cartesian_point origin ()
 the origin of the two-dimensional system. More...
 

Detailed Description

Provides a geometric point that use double floating points numbers.

Definition at line 27 of file cartesian_objects.h.

Constructor & Destructor Documentation

◆ cartesian_point() [1/3]

geometric::cartesian_point::cartesian_point ( double  x = 0,
double  y = 0 
)
inline

Definition at line 30 of file cartesian_objects.h.

Referenced by origin().

◆ cartesian_point() [2/3]

geometric::cartesian_point::cartesian_point ( double  r,
double_angle  theta 
)
inline

Definition at line 31 of file cartesian_objects.h.

◆ cartesian_point() [3/3]

geometric::cartesian_point::cartesian_point ( const point< double > &  to_copy)
inline

Definition at line 32 of file cartesian_objects.h.

Member Function Documentation

◆ DEFINE_CLASS_NAME()

geometric::cartesian_point::DEFINE_CLASS_NAME ( "cartesian_point"  )

◆ origin()

static cartesian_point geometric::cartesian_point::origin ( )
inlinestatic

the origin of the two-dimensional system.

Definition at line 35 of file cartesian_objects.h.

References cartesian_point().


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