class
Euclid3D
(Return to index)
Displacement and rotation in space.
An arbitrary 3-dimension translation and rotation.
The translation is a 3-dimensional vector, the rotation is represented
as a 3-dimensional orthonormal matrix.
{P}
If we think of an Euler3D object as an operator E which transforms a
point in the super-frame X to the local frame X':
{P}
X' = E(X),
{P}
then we can define a dot product of two successive operations in the
following way: Given two Euclid3D objects (operators) E1 and E2,
we can define
{P}
E3 = E2 . E1
{P}
using
{P}
X''= E3(X) = E2(E1(X)).
{P}
The definition of a multiplicative inverse naturally follows as
{P}
E . inv(E) = I.
{P}
If R represents the 3-d rotation and X the vector specified by
(x,y,z), then a transformation of a point P in the super-frame by
the Euclid3D is given by
{P}
P -> R . P + X.
{P}
For the representation of rotations, see Rotation3D.
The copy constructor, destructor, and assignment operator generated
by the compiler perform the correct operation. For speed reasons they
are not implemented.
An alternate representation for the rotation is given by a vector
pointing in the direction of the axis of rotation, whose sense is
given by the right-hand rule, and whose length is equal to the angle
of rotation.
Type: |
Instantiable |
Include file: |
./BeamlineGeometry/Euclid3D.hh |
Synopsis (including inherited members):
- Public members:
-
Euclid3D
()
;
-
Euclid3D
(const Vector3D&,const Rotation3D&)
;
-
Euclid3D
(double,double,double,double,double,double)
;
-
bool operator==
(const Euclid3D&)const
;
-
bool operator!=
(const Euclid3D&)const
;
-
void getAll
(double&,double&,double&,double&,double&,double&)const
;
-
double getX
()const
;
-
double getY
()const
;
-
double getZ
()const
;
-
const Vector3D& getVector
()const
;
-
const Rotation3D& getRotation
()const
;
-
double M
(int,int)const
;
-
void setX
(double)
;
-
void setY
(double)
;
-
void setZ
(double)
;
-
void setDisplacement
(const Vector3D&)
;
-
void setRotation
(const Rotation3D&)
;
-
Euclid3D dot
(const Euclid3D&)const
;
-
const Euclid3D& dotBy
(const Euclid3D&)
;
-
Euclid3D operator*
(const Euclid3D&)const
;
-
const Euclid3D& operator*=
(const Euclid3D&)
;
-
Euclid3D inverse
()const
;
-
bool isIdentity
()const
;
-
bool isPureTranslation
()const
;
-
bool isPureXRotation
()const
;
-
bool isPureYRotation
()const
;
-
bool isPureZRotation
()const
;
-
static Euclid3D identity
()
;
-
static Euclid3D translation
(double,double,double)
;
-
static Euclid3D XRotation
(double)
;
-
static Euclid3D YRotation
(double)
;
-
static Euclid3D ZRotation
(double)
;
Documentation:
- Public members:
-
Euclid3D
()
;
- Default constructor.
Construct identity.
-
Euclid3D
(const Vector3D&,const Rotation3D&)
;
- Constructor/
Use displacement V and rotation R.
-
Euclid3D
(double,double,double,double,double,double)
;
- Constructor.
Use displacement (x,y,z) and rotation (vx,vy,vz).
-
double M
(int,int)const
;
- Get component.
Return the component (row,col) of the rotation matrix.
-
static Euclid3D XRotation
(double)
;
- Make rotation.
Construct pure rotation by angle around the x-axis;
-
static Euclid3D YRotation
(double)
;
- Make rotation.
Construct pure rotation by angle around the y-axis;
-
static Euclid3D ZRotation
(double)
;
- Make rotation.
Construct pure rotation by angle around the z-axis;
-
Euclid3D dot
(const Euclid3D&)const
;
- Dot product.
Return composition of this with rhs.
-
const Euclid3D& dotBy
(const Euclid3D&)
;
- Dot product with assign.
Return composition of this with rhs.
-
void getAll
(double&,double&,double&,double&,double&,double&)const
;
- Unpack.
Return the displacement in (x,y,z) and the rotation axis in (vx,vy,vz).
-
const Rotation3D& getRotation
()const
;
- Get rotation.
Return rotation as an orthogonal matrix.
-
const Vector3D& getVector
()const
;
- Get displacement.
Return displacement as a vector.
-
double getX
()const
;
- Get displacement.
Return x-component of displacement.
-
double getY
()const
;
- Get displacement.
Return x-component of displacement.
-
double getZ
()const
;
- Get displacement.
Return x-component of displacement.
-
static Euclid3D identity
()
;
- Make identity.
-
Euclid3D inverse
()const
;
- Inverse.
-
bool isIdentity
()const
;
- Test for identity.
-
bool isPureTranslation
()const
;
- Test for translation.
Return true, if this is a pure translation.
-
bool isPureXRotation
()const
;
- Test for rotation.
Return true, if this is a pure x-rotation.
-
bool isPureYRotation
()const
;
- Test for rotation.
Return true, if this is a pure y-rotation.
-
bool isPureZRotation
()const
;
- Test for rotation.
Return true, if this is a pure z-rotation.
-
Euclid3D operator*
(const Euclid3D&)const
;
- Dot product.
Return composition of this with rhs.
-
const Euclid3D& operator*=
(const Euclid3D&)
;
- Dot product with assign.
-
void setDisplacement
(const Vector3D&)
;
- Set displacement.
Assign displacement as a vector.
-
void setRotation
(const Rotation3D&)
;
- Set rotation.
Assign rotation as an orthogonal matrix.
-
void setX
(double)
;
- Set displacement.
Assign x-component of displacement.
-
void setY
(double)
;
- Set displacement.
Assign y-component of displacement.
-
void setZ
(double)
;
- Set displacement.
Assign z-component of displacement.
-
static Euclid3D translation
(double,double,double)
;
- Make translation.
Use displacement (x,y,z).
Documentation generated by fci on Mon Feb 7 11:41:38 2000