Files
create/src/Base/RotationPy.xml
2021-10-27 10:40:35 +02:00

182 lines
6.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="PyObjectBase"
Name="RotationPy"
Twin="Rotation"
TwinPointer="Rotation"
Include="Base/Rotation.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
NumberProtocol="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the Rotation export class</DeveloperDocu>
<UserDocu>
A Rotation using a quaternion.
The Rotation object can be created by:
-- an empty parameter list
-- a Rotation object
-- a Vector (axis) and a float (angle)
-- two Vectors (rotation from/to vector)
-- three floats (Euler angles) as yaw-pitch-roll in XY'Z'' convention
-- one string and three floats (Euler angles) as euler rotation
of a given type. Call toEulerSequence() for supported sequence types.
-- four floats (Quaternion) where the quaternion is specified as:
q=xi+yj+zk+w, i.e. the last parameter is the real part
-- three vectors that define rotated axes directions + an optional
3-characher string of capital letters 'X', 'Y', 'Z' that sets the
order of importance of the axes (e.g., 'ZXY' means z direction is
followed strictly, x is used but corrected if necessary, y is ignored).
</UserDocu>
</Documentation>
<Methode Name="invert">
<Documentation>
<UserDocu>
invert() -> None
Sets the rotation to its inverse
</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverted">
<Documentation>
<UserDocu>
inverted() -> Rotation
Returns the inverse of the rotation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isSame">
<Documentation>
<UserDocu>
isSame(Rotation, [tolerance=0])
Checks if the two quaternions perform the same rotation.
Optionally, a tolerance value greater than zero can be passed.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="multiply" Const="true">
<Documentation>
<UserDocu>
multiply(Rotation)
Multiply this quaternion with another quaternion
</UserDocu>
</Documentation>
</Methode>
<Methode Name="multVec" Const="true">
<Documentation>
<UserDocu>
multVec(Vector) -> Vector
Compute the transformed vector using the rotation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="slerp" Const="true">
<Documentation>
<UserDocu>
slerp(Rotation, Float) -> Rotation
Spherical linear interpolation of this and a given rotation. The float must be in the range of 0 and 1
</UserDocu>
</Documentation>
</Methode>
<Methode Name="setYawPitchRoll">
<Documentation>
<UserDocu>
setYawPitchRoll(angle1, angle2, angle3)
Set the Euler angles of this rotation
as yaw-pitch-roll in XY'Z'' convention.
NOTE: The angles are in degree
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getYawPitchRoll" Const="true">
<Documentation>
<UserDocu>
getYawPitchRoll() -> list
Get the Euler angles of this rotation
as yaw-pitch-roll in XY'Z'' convention
NOTE: The angles are in degree
</UserDocu>
</Documentation>
</Methode>
<Methode Name="setEulerAngles">
<Documentation>
<UserDocu>
setEulerAngles(seq, angle1, angle2, angle3)
Set the Euler angles in a given sequence for this rotation.
'seq' is the Euler sequence name. You get all possible values with toEulerAngles()
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toEulerAngles" Const="true">
<Documentation>
<UserDocu>
toEulerAngles(seq='') -> list
Get the Euler angles in a given sequence for this rotation.
Call this function without arguments to output all possible values of 'seq'.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toMatrix" Const="true">
<Documentation>
<UserDocu>
toMatrix()
convert the rotation to a matrix representation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isNull" Const="true">
<Documentation>
<UserDocu>
isNull() -> Bool
returns True if all Q values are zero
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isIdentity" Const="true">
<Documentation>
<UserDocu>
isIdentity() -> Bool
returns True if the rotation equals the unity matrix
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Q" ReadOnly="false">
<Documentation>
<UserDocu>The rotation elements (as quaternion)</UserDocu>
</Documentation>
<Parameter Name="Q" Type="Tuple" />
</Attribute>
<Attribute Name="Axis" ReadOnly="false">
<Documentation>
<UserDocu>The rotation axis of the quaternion</UserDocu>
</Documentation>
<Parameter Name="Axis" Type="Object" />
</Attribute>
<Attribute Name="RawAxis" ReadOnly="true">
<Documentation>
<UserDocu>The rotation axis without normalization</UserDocu>
</Documentation>
<Parameter Name="RawAxis" Type="Object" />
</Attribute>
<Attribute Name="Angle" ReadOnly="false">
<Documentation>
<UserDocu>The rotation angle of the quaternion</UserDocu>
</Documentation>
<Parameter Name="Angle" Type="Float" />
</Attribute>
<ClassDeclarations>
public:
RotationPy(const Rotation &amp; mat, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Rotation(mat),T){}
Rotation value() const
{ return *(getRotationPtr()); }
</ClassDeclarations>
</PythonExport>
</GenerateModel>