Base: Placement: expose ScLERP to python

This commit is contained in:
DeepSOIC
2019-10-11 13:21:48 +03:00
committed by wwmayer
parent 63d0435a95
commit 23e708323c
2 changed files with 57 additions and 23 deletions

View File

@@ -85,7 +85,7 @@ Placement(Base, Axis, Angle) -- define position and rotation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverse" Const="true">
<Methode Name="inverse" Const="true">
<Documentation>
<UserDocu>
inverse() -> Placement
@@ -93,6 +93,27 @@ Placement(Base, Axis, Angle) -- define position and rotation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="pow" Const="true">
<Documentation>
<UserDocu>
pow(t, shorten = true): raise this placement to real power using ScLERP interpolation.
If 'shorten' is true, ensures rotation quaternion is net positive, to make the path shorter.
Also available as ** operator.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="sclerp" Const="true">
<Documentation>
<UserDocu>
sclerp(t, placement2, shorten = True): interpolate between self and placement2.
Interpolation is a continuous motion along a helical path, made of equal transforms if discretized.
t = 0.0 - return self. t = 1.0 - return placement2. t can also be outside of 0..1 range, for extrapolation.
If quaternions of rotations of the two placements differ in sign, the interpolation will
take a long path. If 'shorten' is true, the signs are harmonized before interpolation, and the
interpolation takes the shorter path.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isIdentity" Const="true">
<Documentation>
<UserDocu>