Skip to content
Snippets Groups Projects
Commit 6fcf40d9 authored by Ansgar Philippsen's avatar Ansgar Philippsen
Browse files

EntityHandle interface change! Also refactored EntityImpl to use Transform handle transformations

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.
parent 817e92ea
No related branches found
No related tags found
No related merge requests found
Showing
with 256 additions and 144 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment