Bone

Bone class

A bone defines the subset of the geometry’s control point, and defined blend weight for each control point. The Bone object cannot be used directly, a SkinDeformer instance is used to deform the geometry, and SkinDeformer comes with a set of bones, each bone linked to a node. NOTE: A control point of a geometry can be bounded to more than one Bones.

Methods

constructor

NameDescription
constructor(name)Initializes a new instance of the Bone class.

Parameters:

NameTypeDescription
nameStringName.

Result:


constructor_overload

NameDescription
constructor_overload()Initializes a new instance of the Bone class.

Result:


getWeightCount

NameDescription
getWeightCount()Gets the count of weight, this is automatically extended by setWeight(int, double)

Result:


getTransform

NameDescription
getTransform()Gets or sets the transform matrix of the node containing the bone.

Result:


setTransform

NameDescription
setTransform(value)Gets or sets the transform matrix of the node containing the bone.

Result:


getBoneTransform

NameDescription
getBoneTransform()Gets or sets the transform matrix of the bone.

Result:


setBoneTransform

NameDescription
setBoneTransform(value)Gets or sets the transform matrix of the bone.

Result:


getNode

NameDescription
getNode()Gets or sets the node. The bone node is the bone which skin attached to, the SkinDeformer will use bone node to influence the displacement of the control points. Bone node usually has a Skeleton attached, but it’s not required. Attached Skeleton is usually used by DCC software to show skeleton to user.

Result:


setNode

NameDescription
setNode(value)Gets or sets the node. The bone node is the bone which skin attached to, the SkinDeformer will use bone node to influence the displacement of the control points. Bone node usually has a Skeleton attached, but it’s not required. Attached Skeleton is usually used by DCC software to show skeleton to user.

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


get

NameDescription
get(index)

Result:


set

NameDescription
set(index, value)

Result:


getWeight

NameDescription
getWeight(index)Gets the weight for control point specified by index

Parameters:

NameTypeDescription
indexNumberControl point’s index

Result: Number


setWeight

NameDescription
setWeight(index, weight)Sets the weight for control point specified by index

Parameters:

NameTypeDescription
indexNumberControl point’s index
weightNumberNew weight

Result: Number


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property