Node#
- class pyCGM2.Model.frame.Node(label, desc='')#
Represents a local position of a 3D point in a coordinate system.
- Parameters:
label (str) – The desired label of the node.
desc (str, optional) – A description of the node.
- __init__(label, desc='')#
Methods
__init__
(label[, desc])computeGlobal
(rot, t)Computes the global position of the node from its local position using the provided rotation matrix and translation vector.
computeLocal
(rot, t)Computes the local position of the node from its global position using the provided rotation matrix and translation vector.
Returns the description of the node.
Returns the global coordinates of the node.
getLabel
()Returns the label of the node.
getLocal
()Returns the local coordinates of the node.
setDescription
(description)Sets a description for the node.
- computeGlobal(rot: ndarray, t: ndarray) None #
Computes the global position of the node from its local position using the provided rotation matrix and translation vector.
- Parameters:
rot (np.ndarray) – A 3x3 rotation matrix.
t (np.ndarray) – A 3-element translation vector.
- computeLocal(rot: ndarray, t: ndarray) None #
Computes the local position of the node from its global position using the provided rotation matrix and translation vector.
- Parameters:
rot (np.ndarray) – A 3x3 rotation matrix.
t (np.ndarray) – A 3-element translation vector.
- getDescription() str #
Returns the description of the node.
- Returns:
str – The description of the node.
- getGlobal() ndarray #
Returns the global coordinates of the node.
- Returns:
np.ndarray – The global coordinates of the node.
- getLabel() str #
Returns the label of the node.
- Returns:
str – The label of the node.
- getLocal() ndarray #
Returns the local coordinates of the node.
- Returns:
np.ndarray – The local coordinates of the node.
- setDescription(description: str) None #
Sets a description for the node.
- Parameters:
description (str) – The description to set for the node.