Class

OCOLimb

OCOLimb(limbopt, sideopt, locationopt, typeopt)

A limb contained in an OCO Doc.
Constructor

# new OCOLimb(limbopt, sideopt, locationopt, typeopt)

Creates a new OCO Limb.
Parameters:
Name Type Attributes Default Description
limb OCO.Limb <optional>
OCO.Limb.CUSTOM A Predefined limb
side OCO.Side <optional>
OCO.Side.NONE The side of the limb
location OCO.Location <optional>
OCO.Location.NONE The location of the limb
type OCO.LimbType <optional>
OCO.LimbType.CUSTOM The type of the limb

View Source DuAEF_DuGR_api.jsxinc, line 16562

Members

OCO.Limb

# static limb

The predefined limb

View Source DuAEF_DuGR_api.jsxinc, line 16564

Array.<OCOLimb>

# static limbs

The limbs/ Armatures

View Source DuAEF_DuGR_api.jsxinc, line 15083

OCO.Location

# static location

The location of the limb

View Source DuAEF_DuGR_api.jsxinc, line 16585

Array.<OCOBone>

# static location

The bones of the limb

View Source DuAEF_DuGR_api.jsxinc, line 16592

OCO.Side

# static side

The sided of the limb

View Source DuAEF_DuGR_api.jsxinc, line 16578

OCO.LimbType

# static type

The type of the limb

View Source DuAEF_DuGR_api.jsxinc, line 16571

Methods

# static fromObject(data) → {OCOLimb}

Creates a limb from a js object.
Parameters:
Name Type Description
data Object The js object representing the limb

View Source DuAEF_DuGR_api.jsxinc, line 16697

The new limb
OCOLimb

# bounds() → {Array.<float>}

Gets the boundaries of the limb

View Source DuAEF_DuGR_api.jsxinc, line 16619

[left, top, right, bottom]
Array.<float>

# newArmature(name, numopt, lengthopt) → {OCOBone}

Creates a new chain of bones and adds it to the limb.
Parameters:
Name Type Attributes Default Description
name string The name of the bones (will increment if needed)
num int <optional>
2 The number of bones in the chain
length float <optional>
100.0 The length in centimeters

View Source DuAEF_DuGR_api.jsxinc, line 16631

The root bone.
OCOBone

# numBones() → {int}

Counts the total number of bones in this limb

View Source DuAEF_DuGR_api.jsxinc, line 16605

int

# toObject() → {Object}

Creates a js object containing this limb data.
This object could then be exported to JSON for example.

View Source DuAEF_DuGR_api.jsxinc, line 16673

The JS Object
Object