Class: KinematicsComponent

KinematicsComponent(parent, hierachy)

This class represents a Kinematics Component

Constructor

new KinematicsComponent(parent, hierachy)

Creates a Kinematic Component Object

Parameters:
Name Type Description
parent KinematicsComponent

Parent Component

hierachy KinematicsHierachy

Hierachy this component belongs to

Classes

KinematicsComponent

Methods

addAnimation(animationid)

Add an animation template id to the component.

Parameters:
Name Type Description
animationid uuid

Animation ID

(async) calculateMatrixFromHandleMatrix(matrix)

Derives component matrix from active handle matrix

Parameters:
Name Type Description
matrix object

Handle Matrix

delete()

Delete Component and remove from hierachy

getAnimationActive() → {bool}

Retrieves if an animation is currently active on a component

Returns:

Is Animation Active

Type
bool

getAnimationByIndex(i) → {uuid}

Retrieves an animation associated with a component by its index

Parameters:
Name Type Description
i number

Index of animation

Returns:

Animation Template Id

Type
uuid

getAnimations() → {array}

Retrieves all animations associated with a component

Returns:

Array of Animation Template Ids

Type
array

getAxis() → {Point3}

Retrieves the component axis

Returns:

Component Axis

Type
Point3

getBehavior() → {object}

Retrieves the behavior object for the component

Returns:

KinematicsBehavior

Type
object

getCenter() → {Point3}

Retrieves the component center

Returns:

Component Center

Type
Point3

getChildByIndex(i) → {KinematicsComponent}

Retrieves a child component by its index

Parameters:
Name Type Description
i number

Index of child component

Returns:

Child Component

Type
KinematicsComponent

getChildren() → {array}

Retrieves all children of component

Returns:

Array of children components

Type
array

getCurrentValue() → {number}

Retrieves the value of the current component (angle or relative position)

Returns:

Current Value

Type
number

getEnforceLimits() → {bool}

Retrieves if limits should be enforced during behavior evalulation for this component

Returns:

Enforce Limits

Type
bool

getHierachy() → {KinematicsHierachy}

Retrieves the hierachy associated with a component

Returns:

Hierachy

Type
KinematicsHierachy

getId() → {number}

Retrieve Component Id

Returns:

Component ID

Type
number

getIsReference() → {bool}

Retrieves if component is a reference component
Reference Components are components that are NOT children of their parent component in the HC node hierachy

Returns:

Is Component a Reference Component

Type
bool

getMaxLimit() → {number}

Retrieves the maximum limit value for a component

Returns:

maximum limit

Type
number

getMinLimit() → {number}

Retrieves the minimum limit value for a component

Returns:

minimum limit

Type
number

getParent() → {KinematicsComponent}

Retrieves parent of component

Returns:

Component Parent

Type
KinematicsComponent

getType() → {componentType}

Retrieves type of component

Returns:

Component Type

Type
componentType

moveup()

Make component child of parent component

removeAnimation(animationid)

Remove an animation from the component based on its template id.

Parameters:
Name Type Description
animationid uuid

Animation ID

removeReferenceNodes(nodeids)

Remove all nodes specified in the supplied array from the component

Parameters:
Name Type Description
nodeids array

Array of nodeids to remove from the component

selectReferenceNodes()

Select all nodes associated to this component

set(value)

Sets the value (rotation or translation) for the component (applicable to componentType.prismatic or componentType.revolute)

Parameters:
Name Type Description
value number

Value

setAxis(axis)

Sets the component axis

Parameters:
Name Type Description
axis Point3

Component Axis

setBehavior(behavior)

Sets the behavior object for the component

Parameters:
Name Type Description
behavior object

KinematicsBehavior

setCenter(center)

Sets the component center

Parameters:
Name Type Description
center Point3

Component Center

setEnforceLimits(enforceLimits)

Sets if limits should be enforced during behavior evalulation for this component

Parameters:
Name Type Description
enforceLimits bool

Enforce Limits

setIsReference(isReference)

Sets if component is a reference component
Reference Components are components that are NOT children of their parent component in the HC node hierachy

Parameters:
Name Type Description
isReference bool

Is Component a Reference Component

setMaxLimit(minlimit)

Sets the maximum limit value for a component

Parameters:
Name Type Description
minlimit number

minimum limit

setMinLimit(minlimit)

Sets the minimum limit value for a component

Parameters:
Name Type Description
minlimit number

minimum limit

setParametersFromHandle()

Calculates Center and Axis of component from active handle

setParent(parent)

Sets component parent

Parameters:
Name Type Description
parent KinematicsComponent

Parent Component

setType(type)

Sets type of component

Parameters:
Name Type Description
type componentType

Component Type

showHandles(showFixed, nodeid, center)

Show Handles based on component parameters

Parameters:
Name Type Description
showFixed bool

Show Fixed Axis

nodeid number

Add additional node to selection

center Point3

Center of Handles (optional)

updateReferenceNodes(nodeids)

Update all HOOPS Communicator nodes associated with this component

Parameters:
Name Type Description
nodeids array

Array of nodeids to associate with this component