unreal.BodyStateSkeleton

class unreal.BodyStateSkeleton(outer=None, name='None')

Bases: unreal.Object

Body Skeleton data, all bones are expected in component space

C++ Source:

  • Plugin: LeapMotion
  • Module: BodyState
  • File: BodyStateSkeleton.h

Editor Properties: (see get_editor_property/set_editor_property)

  • bones (Array(BodyStateBone)): [Read-Write] Note: Storage of actual bone data should be here
  • name (str): [Read-Write] Human readable name, taken from device config, useful for debug
  • root_offset (Transform): [Read-Write] Used for reference point calibration e.g. hydra base origin
  • skeleton_id (int32): [Read-Write] Id issued to this skeleton, useful for getting device information
  • tracking_tags (Array(str)): [Read-Write] Tracking Tags that this skeleton has currently inherited.
bone_for_enum(bone) → BodyStateBone

Get Bone data by enum

Parameters:bone (BodyStateBasicBoneType) –
Returns:
Return type:BodyStateBone
bone_named(name) → BodyStateBone

Get Bone data by name matching

Parameters:name (str) –
Returns:
Return type:BodyStateBone
bones

**(Array(BodyStateBone))* – [Read-Only] Note* – Storage of actual bone data should be here

change_basis(pre_base, post_base, adjust_vectors=True) → None

Change Basis

Parameters:
get_minimal_named_skeleton_data() → NamedSkeletonData

Conversion

Returns:
Return type:NamedSkeletonData
head() → BodyStateBone

Spine & Head

Returns:
Return type:BodyStateBone
left_arm() → BodyStateArm

Get a structured convenience wrapper around left arm bones

Returns:
Return type:BodyStateArm
merge_from_other_skeleton(other) → None

Copies only bones that are tracked from the other skeleton

Parameters:other (BodyStateSkeleton) –
name

(str) – [Read-Only] Human readable name, taken from device config, useful for debug

reset_to_default_skeleton() → None

Setting Bone Data

right_arm() → BodyStateArm

Get a structured convenience wrapper around right arm bones

Returns:
Return type:BodyStateArm
root_bone() → BodyStateBone

Root

Returns:
Return type:BodyStateBone
root_offset

(Transform) – [Read-Only] Used for reference point calibration e.g. hydra base origin

set_data_for_bone(bone_data, bone) → None

Set Data for Bone

Parameters:
set_from_named_skeleton_data(named_skeleton_data) → None

key replication getter

Parameters:named_skeleton_data (NamedSkeletonData) –
set_from_other_skeleton(other) → None

key replication setter

Parameters:other (BodyStateSkeleton) –
set_meta_for_bone(bone_meta, bone) → None

Set Meta for Bone

Parameters:
set_transform_for_bone(transform, bone) → None

Set Transform for Bone

Parameters:
skeleton_id

(int32) – [Read-Only] Id issued to this skeleton, useful for getting device information

tracking_tags

(Array(str)) – [Read-Only] Tracking Tags that this skeleton has currently inherited.