vrdConstraintNode¶
-
class
vrdConstraintNode
¶
(Inherits vrdNode
)
This class serves as a base class for vrdParentConstraintNode, vrdPositionConstraintNode, vrdOrientationConstraintNode and vrdAimConstraintNode. It gives base access to a constraint object in VRED.
For managing constraints and code examples see vrConstraintService.
Summary¶
Functions¶
-
vrdConstraintNode.
clearConstrainedNode
()¶ Clears the constrained object node.
-
vrdConstraintNode.
clearTargetNodes
()¶ Clears the set target nodes of the constraint.
-
vrdConstraintNode.
getConstrainedNode
()¶ Returns the node set as the constrained object.
Returns: The constrained object node. Return type: vrdNode
-
vrdConstraintNode.
getTargetNodes
()¶ Returns the list of nodes set as targets for the constraint.
Returns: The list of constraint target nodes. Return type: List[vrdNode]
-
vrdConstraintNode.
getTargetNodeWeight
(node)¶ Gets the weight for a target node of the constraint. The node must be referenced in the target nodes list of the constraint.
Parameters: node (vrdNode) – The target node to get the weight for. Returns: The weight for the target node. If the node is not found, 0.0 is returned. Return type: float
-
vrdConstraintNode.
isActive
()¶ Returns if the constraint is active.
Returns: True if constraint is active, False otherwise. Return type: bool
-
vrdConstraintNode.
setActive
(value)¶ Sets the constraint active/deactive.
Parameters: value (bool) – True if active, False otherwise.
-
vrdConstraintNode.
setConstrainedNode
(node)¶ Sets a node as the constrained object.
Parameters: node (vrdNode) – The node to set as the constrained object.