Skip to content
Snippets Groups Projects
user avatar
Ansgar Philippsen authored
the internal representation of a transformation for EntityImpl was changed from Mat4 to Transform
in preparation for adding transformations to entity views; this impacts quite a few higher-level routines
that used the transformation matrix, which now can use the more elegant Transform::Apply method instead;

GetTransformationMatrix and IsTransformationIdentity methods in the EntityHandle interface are marked
as deprecated; use GetTransform and HasTransform instead. In addition, there is a ClearTransform method
which ensures that the internal has_transform flag gets set to false

geom::Transform was extended to offer ApplyInverse, and matrix inversion exceptions are handled internally

constructing a Vec3 from a Vec4 no longer throws a DivideByZero error when w is close to zero, instead it
is silently assumed that this is not a true homogeneous coordinate conversion

as an additional comment (and note to self), atom->GetPos always returns transformed positions; however,
GetAltPos returns original positions, and original positions are also stored in the AtomGroup on the
Impl level. Both the mol unit test as well as the PDB writer expect this behavior; the PDB writer applies
the transform after calling GetAltPos. Commented code is in place now to change this behavior, i.e. have
GetAltPos return transformed positions, making it consistent with GetPos, should this be desired.
6fcf40d9
History
Name Last commit Last update