|
| LocalTransformation (std::vector< TGeoNode const * > const &path, size_t depth) |
| Constructor: chains the transformations from the specified nodes. More...
|
|
| LocalTransformation (std::vector< TGeoNode const * > const &path) |
| Constructor: chains the transformations from all specified nodes. More...
|
|
template<typename ITER > |
| LocalTransformation (ITER begin, ITER end) |
| Constructor: sequence of transformations from a node path. More...
|
|
void | LocalToWorld (double const *local, double *world) const |
| Transforms a point from local frame to world frame. More...
|
|
void | LocalToWorldVect (double const *local, double *world) const |
| Transforms a vector from local frame to world frame. More...
|
|
void | WorldToLocal (double const *world, double *local) const |
| Transforms a point from world frame to local frame. More...
|
|
void | WorldToLocalVect (const double *world, double *local) const |
| Transforms a vector from world frame to local frame. More...
|
|
TransformationMatrix_t const & | Matrix () const |
| Direct access to the transformation matrix. More...
|
|
template<> |
void | LocalToWorld (double const *local, double *world) const |
|
template<> |
void | LocalToWorldVect (double const *local, double *world) const |
|
template<> |
void | WorldToLocal (double const *world, double *local) const |
|
template<> |
void | WorldToLocalVect (const double *world, double *local) const |
|
template<> |
void | LocalToWorld (double const *local, double *world) const |
|
template<> |
void | LocalToWorldVect (double const *local, double *world) const |
|
template<> |
void | WorldToLocal (double const *world, double *local) const |
|
template<> |
void | WorldToLocalVect (const double *world, double *local) const |
|
|
| LocalTransformation (TransformationMatrix_t const &matrix) |
| Constructor: uses the specified local-to-world transformation. More...
|
|
| LocalTransformation (TransformationMatrix_t &&matrix) |
|
|
template<typename DestPoint , typename SrcPoint , typename = std::enable_if_t<!std::is_same<SrcPoint, DestPoint>::value>> |
DestPoint | LocalToWorld (SrcPoint const &local) const |
| Transforms a point from local frame to world frame. More...
|
|
template<typename Point > |
Point | LocalToWorld (Point const &local) const |
|
|
template<typename DestVector , typename SrcVector , typename = std::enable_if_t<!std::is_same<SrcVector, DestVector>::value>> |
DestVector | LocalToWorldVect (SrcVector const &local) const |
| Transforms a vector from local frame to world frame. More...
|
|
template<typename Vector > |
Vector | LocalToWorldVect (Vector const &local) const |
|
|
template<typename DestPoint , typename SrcPoint , typename = std::enable_if_t<!std::is_same<SrcPoint, DestPoint>::value>> |
DestPoint | WorldToLocal (SrcPoint const &world) const |
| Transforms a point from world frame to local frame. More...
|
|
template<typename Point > |
Point | WorldToLocal (Point const &world) const |
|
|
template<typename DestVector , typename SrcVector , typename = std::enable_if_t<!std::is_same<SrcVector, DestVector>::value>> |
DestVector | WorldToLocalVect (SrcVector const &world) const |
| Transforms a vector from world frame to local frame. More...
|
|
template<typename Vector > |
Vector | WorldToLocalVect (Vector const &world) const |
|
template<typename StoredMatrix>
class geo::LocalTransformation< StoredMatrix >
Class to transform between world and local coordinates.
- Template Parameters
-
StoredMatrix | type of transformation matrix internally stored |
This class provides two directions of transformations (world to local and the other way around), for points and for vectors. The vector version of the transformation does not apply translation.
- Note
- In the class method examples, the following definition is assumed:
Definition at line 64 of file LocalTransformation.h.
template<typename StoredMatrix>
Transforms a point from local frame to world frame.
- Parameters
-
local | local coordinates: [0] x, [1] y, [2] z [cm] |
world | (output) corresponding world coordinates [cm] |
The full transformation is applied. Fox example:
LocalTransformation_t trans( ... );
std::array<double, 3U>
origin, center;
origin.fill(0.);
trans.LocalToWorld(origin.data(), center.data());
center
will contain the world coordinates of the center of the volume, which is usually represented by the origin in the local coordinates.
In-place replacement is not supported: world
and local
buffers are assumed not to, and must not, overlap.
template<typename StoredMatrix>
template<typename DestPoint , typename SrcPoint , typename = std::enable_if_t<!std::is_same<SrcPoint, DestPoint>::value>>
Transforms a point from local frame to world frame.
- Template Parameters
-
SrcPoint | type of the input (local) vector |
DestPoint | type of the output (world) vector (default: as Point ) |
- Parameters
-
local | local coordinates [cm] |
- Returns
- corresponding world coordinates [cm]
The full transformation is applied. Fox example:
LocalTransformation_t trans( ... );
auto center = trans.LocalToWorld(TVector3());
center
will be a TVector3
containing the world coordinates of the center of the volume, which is usually represented by the origin in the local coordinates (a TVector3 is by default constructed to point to the origin).
Definition at line 171 of file LocalTransformation.h.
172 {
return LocalToWorldImpl<DestPoint>(
local); }
template<typename StoredMatrix>
Transforms a vector from local frame to world frame.
- Parameters
-
local | local coordinates: [0] x, [1] y, [2] z [cm] |
world | (output) corresponding world coordinates [cm] |
The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.
In-place replacement is not supported: world
and local
buffers are assumed not to, and must not, overlap.
template<typename StoredMatrix>
template<typename DestVector , typename SrcVector , typename = std::enable_if_t<!std::is_same<SrcVector, DestVector>::value>>
Transforms a vector from local frame to world frame.
- Template Parameters
-
SrcVector | type of the input (local) vector |
DestVector | type of output (world) vector (default: as Vector ) |
- Parameters
-
local | local coordinates [cm] |
- Returns
- corresponding world coordinates [cm]
The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.
Definition at line 206 of file LocalTransformation.h.
207 {
return LocalToWorldVectImpl<DestVector>(
local); }
template<typename StoredMatrix>
Transforms a point from world frame to local frame.
- Parameters
-
world | world coordinates: [0] x, [1] y, [2] z [cm] |
local | (output) corresponding local coordinates [cm] |
The full transformation is applied. Fox example:
LocalTransformation_t trans( ... );
std::array<double, 3U> world{ 4.0, 5.0, -2.5 },
local;
trans.WorldToLocal(world.data(),
local.data());
local
will contain the local coordinates of the specified point.
In-place replacement is not supported: world
and local
buffers are assumed not to, and must not, overlap.
template<typename StoredMatrix>
template<typename DestPoint , typename SrcPoint , typename = std::enable_if_t<!std::is_same<SrcPoint, DestPoint>::value>>
Transforms a point from world frame to local frame.
- Template Parameters
-
SrcPoint | type of the input (local) vector |
DestPoint | type of the output (world) vector (default: as Point ) |
- Parameters
-
world | world coordinates [cm] |
- Returns
- corresponding local coordinates [cm]
The full transformation is applied. Fox example:
LocalTransformation_t trans( ... );
auto local = trans.WorldToLocal(TVector3(4.0, 5.0, -2.5));
local
will be a TVector3
containing the local coordinates of the specified point.
Definition at line 254 of file LocalTransformation.h.
255 {
return WorldToLocalImpl<DestPoint>(world); }
template<typename StoredMatrix>
Transforms a vector from world frame to local frame.
- Parameters
-
world | world coordinates: [0] x, [1] y, [2] z [cm] |
local | (output) corresponding local coordinates [cm] |
The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.
In-place replacement is not supported: world
and local
buffers are assumed not to, and must not, overlap.
template<typename StoredMatrix>
template<typename DestVector , typename SrcVector , typename = std::enable_if_t<!std::is_same<SrcVector, DestVector>::value>>
Transforms a vector from world frame to local frame.
- Template Parameters
-
SrcVector | type of the input (local) vector |
DestVector | type of output (world) vector (default: as Vector ) |
- Parameters
-
- Returns
- corresponding world coordinates [cm]
The translation is not applied, since the argument is supposed to be a vector, relative difference between two points.
Definition at line 290 of file LocalTransformation.h.
291 {
return WorldToLocalVectImpl<DestVector>(world); }