Model.relativerotatedummyjoint#

Model.relativerotatedummyjoint(collectorentity, axis, rotAngle, parentChild)#

Rotates a dummy joint relative to its current location.

Parameters:
  • collectorentity (Entity) – The object describing the collector entity that is part of the parent/child system. The parent or child system itself will be rotated, depending on the parentChild toggle. Currently, only components is supported.

  • axis (int) –

    The axis of the child that you want to rotate about. Valid values are:

    0 - x-axis

    1 - y-axis

    2 - z-axis

  • rotAngle (double) – The number of degrees to rotate about the axis.

  • parentChild (int) – If set to 0, the child is rotated about its own axis. If set to 1, the parent is rotated about the child’s axis.

Example#

Rotate a joint around the child ‘s x-axis by 25.0 degrees specify the collector that contains the system for the elbow joint#
import hm
import hm.entities as ent

model = hm.Model()

model.relativerotatedummyjoint(
    collectorentity=ent.Component(model, 1), axis=0, rotAngle=25.0, parentChild=0
)