Class Bone

Bone structure for inverse kinematics interactor.

Hierarchy

  • Bone

Constructors

  • Creates a bone structure. (path) - HeadNode - Head + x-rotation + position (path).e1 - YRotNode - y-rotation (path).e1.e1 - ZRotNode - z-rotation (+ geometry) (path).e1.e1.e1 - TailNode - Tail (path).e1.e1.eX - optional additional nodes

    Parameters

    • path: string

      The path for the head of the bone

    • Optional description: string

      Name of the bone (e.g. "Bone 1")

    Returns Bone

Properties

AddGeometryNode: any
AdditionalNodes: Product[]

sibling nodes to the tail node

GeometryNode: any
GeometryNodes: any
HeadNode: Product

head node and node for x-rotation & position (path)

Path: any
TailNode: Product

tail node (path.e1.e1.e1)

YRotNode: Product

node for y-rotation (path.e1)

ZRotNode: Product

node for z-rotation and geometry (path.e1.e1)

Methods

  • Adds a sibling node (path.e1.e1.eX) to the tail node (path.e1.e1.e1) and returns it's id (X). You need this id for SetEvaluatorParameters. And you can access the node by Bone.AdditionalNodes[id].

    Returns

    id of the additional node

    Parameters

    • evaluator: string

      The evaluator to add

    • Optional description: string

      Description of node

    • Optional offsetPosition: number[]

      [posX, posY, posZ]

    • Optional offsetRotation: number[]

      [rotX, rotY, rotZ]

    • Optional scale: number[]

      [scaX, scaY, scaZ]

    Returns number

  • Adds a sibling node (path.e1.e1.eX) to the tail node (path.e1.e1.e1) and returns it's id (X). You can access the node by Bone.AdditionalNodes[id].

    Parameters

    • Optional description: string

      Description of node

    • Optional offsetPosition: number[]

      [posX, posY, posZ]

    • Optional offsetRotation: number[]

      [rotX, rotY, rotZ]

    • Optional scale: number[]

      [scaX, scaY, scaZ]

    Returns number

  • Pushes the created nodes into given response object (bones + optional additional nodes). Requires that the response.EvaluatorParameters array is already initialized.

    Parameters

    • response: EvalResponse

      EvalResponse

    • Optional debug: boolean

      debug logs for evaluator params

    Returns void

  • Parameters

    • position: number[]

    Returns void

  • Sets the parameters for the evaluator at a specific node

    Parameters

    • id: number

      id of the additional node

    • params: {
          [parameter: string]: any;
      }

      evaluator parameters

      • [parameter: string]: any

    Returns void

  • Sets the geometry of the bone. Must be set first before changing other geometry properties like scale etc.

    Returns

    -1 if no new node was created, else the id of the additional node

    Parameters

    • geometry: string

      name of the geometry

    • Optional offsetPos: number[]

      (optional) if set this creates a new node especially for the geometry and moves the geometry to given offset position. [posX, posY, posZ]

    • Optional offsetRot: number[]

      (optional) if set this creates a new node especially for the geometry and rotates the geometry to given offset rotation. [rotX, rotY, rotZ]

    • Optional scale: number[]

      (optional) if set this creates a new node especially for the geometry and scales the geometry to given values. [scaX, scaY, scaZ]

    Returns number

  • Parameters

    • params: {
          [parameter: string]: any;
      }
      • [parameter: string]: any

    Returns void

  • Parameters

    • scale: number[]

    Returns void

  • Parameters

    • visible: any

    Returns void

  • Parameters

    • layer: string

    Returns void

  • Parameters

    Returns void

  • Parameters

    • material: string

    Returns void

  • Sets the initial rotation of the bone.

    Parameters

    • rotation: number[]

      Array(3) with [x, y, z]

    Returns void

  • Sets the position of the tail

    Parameters

    • offset: number

      length of the bone

    • Optional axis: string

      if not given this is "z"

    Returns void

  • Deprecated

    This vector must have a positive number on your chosen axis. The other two direction are set to 0. E.g. z-axis: [0, 0, 1.35]

    Parameters

    • position: number[]

    Returns void

Generated using TypeDoc