Model.absoluterotatedummyjoint#

Model.absoluterotatedummyjoint(collectorentity, xRot, yRot, zRot, parentChild)#

Rotate the dummy’s joint to an absolute position. Rotation occurs first about the X, then Y, then Z.

Parameters:
  • collectorentity (Entity) – The object describing the collector entity. Currently only components are supported.

  • xRot (double) – The rotation in degrees about the child’s X axis.

  • yRot (double) – The rotation in degrees about the child’s Y axis.

  • zRot (double) – The rotation in degrees about the child’s Z axis.

  • parentChild (int) –

    0 - Child rotates about its own axis (after being reset back to parent).

    1 - Parent rotates about the child’s axis.

    Note

    When parentChild=0, xRot, yRot, and zRot define the rotational differences between the parent and child systems. That is, the child will be reset back to the parent, and then it will be rotated about the X, Y, and Z (in that order).
    When parentChild=1, xRot, yRot, and zRot define the rotations in the X, Y, and Z directions that will occur from the current parent’s position.

Example#

For a rotational difference of 20 degrees about the X axis between the child and parent#
import hm
import hm.entities as ent

model = hm.Model()
model.absoluterotatedummyjoint(
    collectorentity=ent.Component(model, 1),
    xRot=20.0,
    yRot=0.0,
    zRot=0.0,
    parentChild=0,
)