Minsky
minsky::Reflect Class Reference

#include <geometry.h>

Collaboration diagram for minsky::Reflect:
Collaboration graph

Public Member Functions

 Reflect (float angle=0, float x0=0, float y0=1)
 
float x (float x, float y) const
 
float y (float x, float y) const
 

Private Attributes

float xx
 
float xy
 
float yx
 
float yy
 
float x0
 
float y0
 

Detailed Description

Definition at line 64 of file geometry.h.

Constructor & Destructor Documentation

◆ Reflect()

minsky::Reflect::Reflect ( float  angle = 0,
float  x0 = 0,
float  y0 = 1 
)
inline

Definition at line 69 of file geometry.h.

References xx, xy, yx, and yy.

69  : x0(x0), y0(y0) {
70  Rotate r(angle,0,0);
71  Point c1=r(-1,0), c2=r(0,1); // columns of UR
72  Point r1=r(c1.x(), c2.x()), r2=r(c1.y(),c2.y()); // rows of (URU^-1)^T
73  xx=r1.x();
74  xy=r1.y();
75  yx=r2.x();
76  yy=r2.y();
77  }
boost::geometry::model::d2::point_xy< float > Point
Definition: geometry.h:34

Member Function Documentation

◆ x()

float minsky::Reflect::x ( float  x,
float  y 
) const
inline

Definition at line 78 of file geometry.h.

References x0, xx, y(), y0, and yx.

Referenced by y().

78  {
79  return xx*(x-x0)+yx*(y-y0)+x0;
80  }
float x(float x, float y) const
Definition: geometry.h:78
float y(float x, float y) const
Definition: geometry.h:81
Here is the call graph for this function:
Here is the caller graph for this function:

◆ y()

float minsky::Reflect::y ( float  x,
float  y 
) const
inline

Definition at line 81 of file geometry.h.

References x(), x0, xy, y0, and yy.

Referenced by x().

81  {
82  return xy*(x-x0)+yy*(y-y0)+y0;
83  }
float x(float x, float y) const
Definition: geometry.h:78
float y(float x, float y) const
Definition: geometry.h:81
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ x0

float minsky::Reflect::x0
private

Definition at line 67 of file geometry.h.

Referenced by x(), and y().

◆ xx

float minsky::Reflect::xx
private

Definition at line 66 of file geometry.h.

Referenced by Reflect(), and x().

◆ xy

float minsky::Reflect::xy
private

Definition at line 66 of file geometry.h.

Referenced by Reflect(), and y().

◆ y0

float minsky::Reflect::y0
private

Definition at line 67 of file geometry.h.

Referenced by x(), and y().

◆ yx

float minsky::Reflect::yx
private

Definition at line 66 of file geometry.h.

Referenced by Reflect(), and x().

◆ yy

float minsky::Reflect::yy
private

Definition at line 66 of file geometry.h.

Referenced by Reflect(), and y().


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