Constructor
new OccupantBodyPart(body_part_type, entities)
- Source:
Example
let body_part = new OccupantBodyPart(OccupantBodyPart.HEAD, [entity1, entity2]);
Parameters:
Name | Type | Description |
---|---|---|
body_part_type |
string | Body part constant |
entities |
Array.<OccupantEntity> | Array of OccupantEntity instances |
Extends
Members
(static) ABDOMEN :string
- Description:
- Abdomen body part
- Source:
Abdomen body part
Type:
- string
(static) CHEST :string
- Description:
- Chest body part
- Source:
Chest body part
Type:
- string
(static) FEMUR :string
- Description:
- Femur body part
- Source:
Femur body part
Type:
- string
(static) FOOT :string
- Description:
- Foot body part
- Source:
Foot body part
Type:
- string
(static) HEAD :string
- Description:
- Head body part
- Source:
Head body part
Type:
- string
(static) KNEE :string
- Description:
- Knee body part
- Source:
Knee body part
Type:
- string
(static) LUMBAR :string
- Description:
- Lumbar body part
- Source:
Lumbar body part
Type:
- string
(static) NECK :string
- Description:
- Neck body part
- Source:
Neck body part
Type:
- string
(static) PELVIS :string
- Description:
- Pelvis body part
- Source:
Pelvis body part
Type:
- string
(static) SHOULDER :string
- Description:
- Shoulder body part
- Source:
Shoulder body part
Type:
- string
(static) TIBIA :string
- Description:
- Tibia body part
- Source:
Tibia body part
Type:
- string
component_type :string
- Description:
- Component constant
- Source:
- Overrides:
Component constant
Type:
- string
entities :Array.<BaseEntity>
- Description:
- Array of BaseEntity instances
- Source:
- Overrides:
Array of BaseEntity instances
Type:
- Array.<BaseEntity>
occupant :WorkflowOccupant
- Description:
- Parent occupant
- Source:
Parent occupant
Type:
Methods
(static) FromJSON(json) → (nullable) {OccupantBodyPart}
- Description:
- construct an OccupantBodyPart from JSON
- Source:
Parameters:
Name | Type | Description |
---|---|---|
json |
Object |
Returns:
- Type
- OccupantBodyPart
(static) Types() → {Array.<string>}
- Description:
- Return an array of all the available body part type strings
- Source:
Example
let body_part_types = OccupantBodyPart.Types();
Returns:
- Type
- Array.<string>
(static) Valid(body_part_type) → {boolean}
- Description:
- check if body_part_type is valid
- Source:
Parameters:
Name | Type | Description |
---|---|---|
body_part_type |
string |
Returns:
true if valid
- Type
- boolean
GetEntityByTag(tag) → (nullable) {BaseEntity}
- Description:
- Get an BaseEntity by tag
- Source:
- Overrides:
Example
let entity = component.GetEntityByTag(OccupantEntity.HEAD_NODE);
Parameters:
Name | Type | Description |
---|---|---|
tag |
string | Entity tag |
Returns:
- Type
- BaseEntity
toJSON() → {object}
- Description:
- JSON representation
- Source:
- Overrides:
Example
let json = component.toJSON();
Returns:
- Type
- object