Flow123d
JS_before_hm-979-g397e552
|
Plucker coordinates representing line given by points A,B. More...
#include <plucker.hh>
Public Types | |
typedef Space< 3 >::Point | Point |
Public Member Functions | |
Plucker () | |
Plucker (Point a, Point b) | |
Creates Plucker coordinates object for a line AB. Does NOT compute Plucker coordinates. Does set end points and computes direction vector. More... | |
Plucker (Point a, const Point b, bool compute_pc) | |
The same as above constructor, but can compute Pl. coordinates immediately if compute_pc . More... | |
~Plucker () | |
Destructor. More... | |
double | scale () const |
double | operator[] (const unsigned int index) const |
Returns Plucker coordinate of index . More... | |
double | operator* (const Plucker &b) |
Compute product of two Plucker coordinates. More... | |
void | clear () |
Sets the flag computed on false. More... | |
bool | is_computed () const |
Return true if Plucker coordinates have been computed already. More... | |
arma::vec3 | point (unsigned int idx) const |
Gets coordinates of point. More... | |
void | compute () |
Compute Plucker coordinates and set computed to true. More... | |
arma::vec3 | get_u_vector () const |
Gets directional vector U. More... | |
arma::vec3 | get_ua_vector () const |
Gets cross product vector UxA. More... | |
arma::vec6 | get_plucker_coords () const |
Gets Plucker coordinates. More... | |
Private Attributes | |
arma::vec6 | coordinates_ |
Plucker coordinates. More... | |
double | scale_ |
bool | computed_ |
True, if Plucker coordinates are computed; false otherwise. More... | |
Armor::Array< double > | points_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Plucker &p) |
Friend output operator. More... | |
Plucker coordinates representing line given by points A,B.
Plucker class represents a line by 6 dimensional vector. After inserting a three-dimensional points A and B, which represents the line, class creates plucker coordinates of the line.
Class also can compute a product of two plucker coordinates.
Description of Plücker Coordinates: https://en.wikipedia.org/wiki/Pl%C3%BCcker_coordinates
Empty constructor is used for passing object to pointers from different places coordinates data are filled after calling method "compute" a flag "computed" is for comparison if coordinates data are filled
Definition at line 45 of file plucker.hh.
typedef Space<3>::Point Plucker::Point |
Definition at line 54 of file plucker.hh.
Plucker::Plucker | ( | ) |
Default constructor. Creates empty object, cannot call compute later!
Definition at line 5 of file plucker.cc.
Creates Plucker coordinates object for a line AB. Does NOT compute Plucker coordinates. Does set end points and computes direction vector.
a | - A point from AB line |
b | - B point from AB line |
Definition at line 13 of file plucker.cc.
The same as above constructor, but can compute Pl. coordinates immediately if compute_pc
.
Definition at line 31 of file plucker.cc.
|
inline |
Destructor.
Definition at line 72 of file plucker.hh.
|
inline |
Sets the flag computed on false.
Definition at line 117 of file plucker.hh.
void Plucker::compute | ( | ) |
Compute Plucker coordinates and set computed to true.
Definition at line 43 of file plucker.cc.
|
inline |
Gets Plucker coordinates.
Definition at line 134 of file plucker.hh.
|
inline |
Gets directional vector U.
Definition at line 126 of file plucker.hh.
|
inline |
Gets cross product vector UxA.
Definition at line 130 of file plucker.hh.
|
inline |
Return true if Plucker coordinates have been computed already.
Definition at line 120 of file plucker.hh.
double Plucker::operator* | ( | const Plucker & | b | ) |
Compute product of two Plucker coordinates.
Definition at line 38 of file plucker.cc.
|
inline |
Returns Plucker coordinate of index
.
Definition at line 113 of file plucker.hh.
|
inline |
Gets coordinates of point.
Definition at line 123 of file plucker.hh.
|
inline |
|
friend |
Friend output operator.
|
private |
True, if Plucker coordinates are computed; false otherwise.
Definition at line 50 of file plucker.hh.
|
private |
Plucker coordinates.
Definition at line 48 of file plucker.hh.
|
private |
Definition at line 51 of file plucker.hh.
|
private |
Definition at line 49 of file plucker.hh.