|
| 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) |
| Constructor: uses the specified local-to-world transformation. More...
|
|
|
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 |
| Transforms a point from local frame to world frame. More...
|
|
|
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 |
| Transforms a vector from local frame to world frame. More...
|
|
|
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 |
| Transforms a point from world frame to local frame. More...
|
|
|
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 |
| Transforms a vector from world frame to local frame. More...
|
|
|
template<typename DestPoint , typename SrcPoint > |
DestPoint | LocalToWorldImpl (SrcPoint const &local) const |
|
template<typename DestVector , typename SrcVector > |
DestVector | LocalToWorldVectImpl (SrcVector const &local) const |
|
template<typename DestPoint , typename SrcPoint > |
DestPoint | WorldToLocalImpl (SrcPoint const &world) const |
|
template<typename DestVector , typename SrcVector > |
DestVector | WorldToLocalVectImpl (SrcVector const &world) const |
|
template<> |
DestPoint | WorldToLocalImpl (SrcPoint const &world) const |
|
template<> |
DestVector | WorldToLocalVectImpl (SrcVector const &world) const |
|
template<> |
DestPoint | LocalToWorldImpl (SrcPoint const &local) const |
|
template<> |
DestVector | LocalToWorldVectImpl (SrcVector const &local) 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 59 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.
Referenced by geo::GeometryCore::DetectorEnclosureBox().
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 160 of file LocalTransformation.h.
162 return LocalToWorldImpl<DestPoint>(local);
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 198 of file LocalTransformation.h.
200 return LocalToWorldVectImpl<DestVector>(local);
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 248 of file LocalTransformation.h.
250 return WorldToLocalImpl<DestPoint>(world);
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 286 of file LocalTransformation.h.
288 return WorldToLocalVectImpl<DestVector>(world);