pchandler.geometry.transforms
Transforms module for pchandler.geometry.
Provides helper functions for transforming point clouds and converting between coordinate systems.
Classes
Point-cloud transformation-array class (4x4 affine). |
- class pchandler.geometry.transforms.Transform
Bases:
_Transform4x4Point-cloud transformation-array class (4x4 affine).
- Parameters:
arr (Array_4x4_T) – 4x4 affine transformation matrix.
- __init__(arr, **kwargs)
Initialize a
Transformfrom a 4x4 array or compatible source.- Parameters:
arr (Array_Float_T or Array_4x4_T or Self) – Input array or object used for initialization.
**kwargs – Additional keyword arguments forwarded to the base class.
- classmethod from_translation(vector)
Build a
Transformfrom a translation vector.- Parameters:
vector (Vector_3_T) – Translation vector.
- Returns:
Affine transform applying
vector.- Return type:
- classmethod from_rotation(matrix)
Build a
Transformfrom a 3x3 rotation matrix.- Parameters:
matrix (Array_3x3_T) – 3x3 rotation matrix.
- Returns:
Affine transform applying
matrix.- Return type:
- classmethod from_affine(matrix)
Build a
Transformfrom a 4x4 affine matrix.- Parameters:
matrix (Array_4x4_T) – 4x4 affine transformation matrix.
- Returns:
Transform wrapping the supplied matrix.
- Return type:
- classmethod generate(rotation=np.eye(3), translation=np.zeros(3), scale=1)
Generate an affine transformation from rotation, translation, and/or scale parameters.
Takes the form x0 = (R * s + t) @ x1
Rotation Translation Scale: | R 0 | | I t | | s 0 | | 0 1 | | 0 1 | | 0 1 |