Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
The placement for a geometry volume with its translation and rotation with respect to some mother reference frame. More...
#include <bayeux/geomtools/placement.h>
Classes | |
class | builder |
Construct a placement. More... | |
Public Member Functions | |
bool | is_valid () const |
Check validity. More... | |
void | invalidate () |
Invalidate. More... | |
const vector_3d & | get_translation () const |
Return the translation. More... | |
vector_3d & | grab_translation () |
Return the mutable translation. More... | |
void | set_translation (double, double, double) |
Set the translation from a (x,y,z) coordinate triplet. More... | |
void | set_translation_xyz (double, double, double) |
Set the translation from a (x,y,z) coordinate triplet. More... | |
void | set_translation (const vector_3d &) |
Set the translation. More... | |
void | set_translation_v (const vector_3d &) |
Set the translation. More... | |
void | translate (const vector_3d &) |
Translate the current translation by some shift. More... | |
void | translate (double dx_, double dy_, double dz_) |
Translate the current translation by some shift. More... | |
bool | is_simple_rotation () const |
Check if the orientation is defined as a simple rotation (X, Y or Z axis) More... | |
bool | is_rotation_x () const |
Check if the orientation is defined as a X axis rotation. More... | |
bool | is_rotation_y () const |
Check if the orientation is defined as a Y axis rotation. More... | |
bool | is_rotation_z () const |
Check if the orientation is defined as a Z axis rotation. More... | |
int | get_rotation_axis () const |
Return rotation axis. More... | |
double | get_rotation_angle () const |
Return rotation angle. More... | |
bool | is_zyz_rotation () const |
Check if the orientation is defined through ZYZ Euler angles. More... | |
double | get_phi () const |
Return phi Euler angle. More... | |
double | get_theta () const |
Return theta Euler angle. More... | |
double | get_delta () const |
Return delta Euler angle. More... | |
bool | has_angles () const |
Chec if Euler angles are defined. More... | |
const rotation_3d & | get_rotation () const |
Return the rotation matrix. More... | |
const rotation_3d & | get_inverse_rotation () const |
Return the inverse rotation matrix. More... | |
virtual size_t | get_dimension () const |
Return the dimension of the(multi-)placement object. More... | |
virtual size_t | get_number_of_items () const |
Return the number of placement entries associated to this placement object. More... | |
virtual void | get_placement (int item_, placement &p_) const |
Compute the placement at given index. More... | |
virtual bool | is_replica () const |
Check if placement is a replica. More... | |
virtual bool | has_only_one_rotation () const |
Check if the (multi-)placement has only one rotation for all its placement objects. More... | |
virtual size_t | compute_index_map (std::vector< uint32_t > &map_, int item_) const |
Compute the list of multi-dimension multiplet for placement at given index. More... | |
bool | is_identity () const |
Check if the placement is identity. More... | |
void | set_identity () |
Set identity. More... | |
void | set_orientation (int axis_, double angle_) |
Set orientation by axis and angle. More... | |
void | set_orientation_axis_angle (int axis_, double angle_) |
Set orientation by axis and angle. More... | |
void | set_orientation (double phi_, double theta_, double delta_) |
Set orientation by ZYZ Euler angles. More... | |
void | set_orientation_zyz (double phi_, double theta_, double delta_) |
Set orientation by ZYZ Euler angles. More... | |
void | set_orientation (double angle0_, double angle1_, double angle2_, euler_angles_type euler_angle_) |
Set orientation by arbitrary Euler angles. More... | |
void | set (double x_, double y_, double z_, double phi_, double theta_, double delta_) |
Set translation by (x,y,z) coordinate triplet and orientation by ZYZ Euler angles. More... | |
void | set (double x_, double y_, double z_, double angle0_, double angle1_, double angle2_, euler_angles_type euler_angle_) |
Set translation by (x,y,z) coordinate triplet and orientation by Euler angles. More... | |
void | set (double x_, double y_, double z_, int axis_, double angle_) |
Set translation by (x,y,z) coordinate triplet and orientation by axis and angle. More... | |
void | set (const vector_3d &t_, double phi_, double theta_, double delta_) |
Set translation by position and orientation ZYZ Euler angles. More... | |
void | set (const vector_3d &t_, double angle0_, double angle1_, double angle2_, euler_angles_type euler_angle_) |
Set translation by position and orientation by Euler angles. More... | |
void | set (const vector_3d &t_, int axis_, double angle_) |
Set translation by position and orientation by axis and angle. More... | |
void | set_orientation (const rotation_3d &) |
Set the rotation (not recommended at all) More... | |
void | set_orientation_xyz (double phi_, double theta_, double delta_) |
Set the rotation using XYZ Euler angles (experimental) More... | |
placement () | |
Constructor. More... | |
placement (const vector_3d &translation_) | |
Constructor. More... | |
placement (double x_, double y_, double z_) | |
Constructor. More... | |
placement (const vector_3d &translation_, double phi_, double theta_, double delta_) | |
Constructor. More... | |
placement (const vector_3d &translation_, int axis_, double angle_) | |
Constructor. More... | |
placement (double x_, double y_, double z_, double phi_, double theta_, double delta_) | |
Constructor. More... | |
placement (double x_, double y_, double z_, double angle0_, double angle1_, double angle2_, euler_angles_type euler_angles_) | |
Constructor. More... | |
placement (const vector_3d &translation_, double angle0_, double angle1_, double angle2_, euler_angles_type euler_angles_) | |
Constructor. More... | |
placement (double x_, double y_, double z_, int axis_, double angle_) | |
Constructor. More... | |
placement (const vector_3d &translation_, const rotation_3d &rotation_) | |
Constructor. More... | |
virtual | ~placement () |
Destructor. More... | |
virtual void | reset () |
Reset. More... | |
void | mother_to_child (const vector_3d &, vector_3d &) const |
vector_3d | mother_to_child (const vector_3d &) const |
void | child_to_mother (const vector_3d &, vector_3d &) const |
vector_3d | child_to_mother (const vector_3d &) const |
void | mother_to_child_direction (const vector_3d &, vector_3d &) const |
vector_3d | mother_to_child_direction (const vector_3d &) const |
void | child_to_mother_direction (const vector_3d &, vector_3d &) const |
vector_3d | child_to_mother_direction (const vector_3d &) const |
void | child_to_mother (const placement &, placement &) const |
void | relocate (const placement &, placement &) const |
void | initialize (const datatools::properties &config_, uint32_t flags_=0) |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print. More... | |
void | dump (std::ostream &out_=std::clog, const std::string &title_="geomutils::placement", const std::string &indent_="") const |
Basic print. More... | |
void | test () const |
Test method. More... | |
Public Member Functions inherited from geomtools::i_placement | |
i_placement () | |
Default constructor. More... | |
virtual | ~i_placement () |
Destructor. More... | |
bool | is_multiple () const |
Check if the placement handles multiple positions. More... | |
placement | get_placement (int item_) const |
Return the placement at given item rank/index. More... | |
placement | get_placement_by_index (int item_) const |
Same as get_placement(int) but workaround method overloading for CAMP. More... | |
void | compute_placement (int item_, placement &p_) const |
Compute the placement at given item rank/index. More... | |
Public Member Functions inherited from datatools::i_serializable | |
i_serializable () | |
Default constructor. More... | |
virtual | ~i_serializable () |
Destructor. More... | |
virtual const std::string & | get_serial_tag () const =0 |
Return the serialization string identifier of the class. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. More... | |
virtual void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const |
Main new interface method for printing. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const |
Printing with jsonized options. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const |
Printing with jsonized options. More... | |
void | tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const |
void | tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const |
void | smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const |
Static Public Member Functions | |
static bool | from_string (const std::string &, placement &) |
Parse from a description string. More... | |
static void | to_string (std::string &, const placement &) |
Convert to a description string. More... | |
Static Public Member Functions inherited from datatools::i_tree_dumpable | |
static const boost::property_tree::ptree & | empty_options () |
static boost::property_tree::ptree | make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false) |
static std::ostream & | last_skip_tag (std::ostream &out_) |
static std::ostream & | skip_tag (std::ostream &out_) |
static std::ostream & | last_tag (std::ostream &out_) |
static std::ostream & | tag (std::ostream &out_) |
Additional Inherited Members | |
Public Types inherited from datatools::i_tree_dumpable | |
enum | ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 } |
Enumeration for standard output streams. More... | |
The placement for a geometry volume with its translation and rotation with respect to some mother reference frame.
geomtools::placement::placement | ( | ) |
Constructor.
geomtools::placement::placement | ( | const vector_3d & | translation_ | ) |
Constructor.
geomtools::placement::placement | ( | double | x_, |
double | y_, | ||
double | z_ | ||
) |
Constructor.
geomtools::placement::placement | ( | const vector_3d & | translation_, |
double | phi_, | ||
double | theta_, | ||
double | delta_ | ||
) |
Constructor.
geomtools::placement::placement | ( | const vector_3d & | translation_, |
int | axis_, | ||
double | angle_ | ||
) |
Constructor.
geomtools::placement::placement | ( | double | x_, |
double | y_, | ||
double | z_, | ||
double | phi_, | ||
double | theta_, | ||
double | delta_ | ||
) |
Constructor.
geomtools::placement::placement | ( | double | x_, |
double | y_, | ||
double | z_, | ||
double | angle0_, | ||
double | angle1_, | ||
double | angle2_, | ||
euler_angles_type | euler_angles_ | ||
) |
Constructor.
geomtools::placement::placement | ( | const vector_3d & | translation_, |
double | angle0_, | ||
double | angle1_, | ||
double | angle2_, | ||
euler_angles_type | euler_angles_ | ||
) |
Constructor.
geomtools::placement::placement | ( | double | x_, |
double | y_, | ||
double | z_, | ||
int | axis_, | ||
double | angle_ | ||
) |
Constructor.
geomtools::placement::placement | ( | const vector_3d & | translation_, |
const rotation_3d & | rotation_ | ||
) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Compute the list of multi-dimension multiplet for placement at given index.
Implements geomtools::i_placement.
void geomtools::placement::dump | ( | std::ostream & | out_ = std::clog , |
const std::string & | title_ = "geomutils::placement" , |
||
const std::string & | indent_ = "" |
||
) | const |
Basic print.
|
static |
Parse from a description string.
double geomtools::placement::get_delta | ( | ) | const |
Return delta Euler angle.
|
virtual |
Return the dimension of the(multi-)placement object.
Implements geomtools::i_placement.
const rotation_3d& geomtools::placement::get_inverse_rotation | ( | ) | const |
Return the inverse rotation matrix.
|
virtual |
Return the number of placement entries associated to this placement object.
Implements geomtools::i_placement.
double geomtools::placement::get_phi | ( | ) | const |
Return phi Euler angle.
|
virtual |
Compute the placement at given index.
Implements geomtools::i_placement.
const rotation_3d& geomtools::placement::get_rotation | ( | ) | const |
Return the rotation matrix.
double geomtools::placement::get_rotation_angle | ( | ) | const |
Return rotation angle.
int geomtools::placement::get_rotation_axis | ( | ) | const |
Return rotation axis.
double geomtools::placement::get_theta | ( | ) | const |
Return theta Euler angle.
const vector_3d& geomtools::placement::get_translation | ( | ) | const |
Return the translation.
vector_3d& geomtools::placement::grab_translation | ( | ) |
Return the mutable translation.
bool geomtools::placement::has_angles | ( | ) | const |
Chec if Euler angles are defined.
|
virtual |
Check if the (multi-)placement has only one rotation for all its placement objects.
Reimplemented from geomtools::i_placement.
void geomtools::placement::initialize | ( | const datatools::properties & | config_, |
uint32_t | flags_ = 0 |
||
) |
void geomtools::placement::invalidate | ( | ) |
Invalidate.
bool geomtools::placement::is_identity | ( | ) | const |
Check if the placement is identity.
|
virtual |
Check if placement is a replica.
Implements geomtools::i_placement.
bool geomtools::placement::is_rotation_x | ( | ) | const |
Check if the orientation is defined as a X axis rotation.
bool geomtools::placement::is_rotation_y | ( | ) | const |
Check if the orientation is defined as a Y axis rotation.
bool geomtools::placement::is_rotation_z | ( | ) | const |
Check if the orientation is defined as a Z axis rotation.
bool geomtools::placement::is_simple_rotation | ( | ) | const |
Check if the orientation is defined as a simple rotation (X, Y or Z axis)
bool geomtools::placement::is_valid | ( | ) | const |
Check validity.
bool geomtools::placement::is_zyz_rotation | ( | ) | const |
Check if the orientation is defined through ZYZ Euler angles.
Given two placements P1 and P2 expressed in some mother coordinate system, recompute the relative placement P2 in the coordinate system of placement P1 and store the result in P2_1.
Usage:
P1.relocate (P2, P2_1);
|
virtual |
Reset.
void geomtools::placement::set | ( | double | x_, |
double | y_, | ||
double | z_, | ||
double | phi_, | ||
double | theta_, | ||
double | delta_ | ||
) |
Set translation by (x,y,z) coordinate triplet and orientation by ZYZ Euler angles.
void geomtools::placement::set | ( | double | x_, |
double | y_, | ||
double | z_, | ||
double | angle0_, | ||
double | angle1_, | ||
double | angle2_, | ||
euler_angles_type | euler_angle_ | ||
) |
Set translation by (x,y,z) coordinate triplet and orientation by Euler angles.
void geomtools::placement::set | ( | double | x_, |
double | y_, | ||
double | z_, | ||
int | axis_, | ||
double | angle_ | ||
) |
Set translation by (x,y,z) coordinate triplet and orientation by axis and angle.
void geomtools::placement::set | ( | const vector_3d & | t_, |
double | phi_, | ||
double | theta_, | ||
double | delta_ | ||
) |
Set translation by position and orientation ZYZ Euler angles.
void geomtools::placement::set | ( | const vector_3d & | t_, |
double | angle0_, | ||
double | angle1_, | ||
double | angle2_, | ||
euler_angles_type | euler_angle_ | ||
) |
Set translation by position and orientation by Euler angles.
void geomtools::placement::set | ( | const vector_3d & | t_, |
int | axis_, | ||
double | angle_ | ||
) |
Set translation by position and orientation by axis and angle.
void geomtools::placement::set_identity | ( | ) |
Set identity.
void geomtools::placement::set_orientation | ( | int | axis_, |
double | angle_ | ||
) |
Set orientation by axis and angle.
void geomtools::placement::set_orientation | ( | double | phi_, |
double | theta_, | ||
double | delta_ | ||
) |
Set orientation by ZYZ Euler angles.
void geomtools::placement::set_orientation | ( | double | angle0_, |
double | angle1_, | ||
double | angle2_, | ||
euler_angles_type | euler_angle_ | ||
) |
Set orientation by arbitrary Euler angles.
void geomtools::placement::set_orientation | ( | const rotation_3d & | ) |
Set the rotation (not recommended at all)
void geomtools::placement::set_orientation_axis_angle | ( | int | axis_, |
double | angle_ | ||
) |
Set orientation by axis and angle.
void geomtools::placement::set_orientation_xyz | ( | double | phi_, |
double | theta_, | ||
double | delta_ | ||
) |
Set the rotation using XYZ Euler angles (experimental)
void geomtools::placement::set_orientation_zyz | ( | double | phi_, |
double | theta_, | ||
double | delta_ | ||
) |
Set orientation by ZYZ Euler angles.
void geomtools::placement::set_translation | ( | double | , |
double | , | ||
double | |||
) |
Set the translation from a (x,y,z) coordinate triplet.
void geomtools::placement::set_translation | ( | const vector_3d & | ) |
Set the translation.
void geomtools::placement::set_translation_v | ( | const vector_3d & | ) |
Set the translation.
void geomtools::placement::set_translation_xyz | ( | double | , |
double | , | ||
double | |||
) |
Set the translation from a (x,y,z) coordinate triplet.
void geomtools::placement::test | ( | ) | const |
Test method.
|
static |
Convert to a description string.
void geomtools::placement::translate | ( | const vector_3d & | ) |
Translate the current translation by some shift.
void geomtools::placement::translate | ( | double | dx_, |
double | dy_, | ||
double | dz_ | ||
) |
Translate the current translation by some shift.
|
virtual |
Smart print.
Reimplemented from geomtools::i_placement.