Skip to content
reduz edited this page Feb 23, 2014 · 11 revisions

Skeleton

####Inherits: Spatial ####Category: Core

Brief Description

Skeleton for characters and animated objects.

Member Functions

Numeric Constants

  • NOTIFICATION_UPDATE_SKELETON = 50

Description

Skeleton provides a hierachial interface for managing bones, including pose, rest and animation (see Animation). Skeleton will support rag doll dynamics in the future.

Member Function Description

  • void add&#95bone ( String name )

Add a bone, with name "name". get&#95bone&#95count will become the bone index.

Return the bone index that matches "name" as its name.

  • String get&#95bone&#95name ( int bone_idx ) const

Return the name of the bone at index "index"

  • int get&#95bone&#95parent ( int bone_idx ) const

Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx".

  • void set&#95bone&#95parent ( int bone_idx, int parent_idx )

Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx".

  • int get&#95bone&#95count ( ) const

Return the amount of bones in the skeleton.

Return the rest transform for a bone "bone_idx".

Set the rest transform for bone "bone_idx"

  • void bind&#95child&#95node&#95to&#95bone ( int bone_idx, Node node )

Deprecated soon

  • void unbind&#95child&#95node&#95from&#95bone ( int bone_idx, Node node )

Deprecated soon

  • Array get&#95bound&#95child&#95nodes&#95to&#95bone ( int bone_idx ) const

Deprecated Soon

  • void clear&#95bones ( )

Clear all the bones in this skeleton.

Return the pose transform for bone "bone_idx".

Return the pose transform for bone "bone_idx".

Clone this wiki locally