GeometryTrajectory#
- class GeometryTrajectory(trajectory, **kwargs)[source]#
Bases:
GeometryGeometry class for displaying animated trajectory sequences.
- Parameters:
- trajectorylist of dict
List of trajectory frames containing geometry data.
- **kwargs
Additional keyword arguments passed to parent Geometry class.
Attributes
Index of the displayed frame.
Number of frames in the trajectory.
Methods
GeometryTrajectory.display_frame(frame_idx)Display specific trajectory frame.
GeometryTrajectory.swap_data(*args, **kwargs)Replace geometry data with new point cloud or mesh data.
- property current_frame#
Index of the displayed frame.
- Returns:
- int or None
Frame last shown via
display_frame(), or None if unknown.
- display_frame(frame_idx)[source]#
Display specific trajectory frame.
- Parameters:
- frame_idxint
Index of frame to display.
- Returns:
- bool
True if frame was successfully displayed, False otherwise.
- property frames#
Number of frames in the trajectory.
- Returns:
- int
Total number of trajectory frames.
- swap_data(*args, **kwargs)[source]#
Replace geometry data with new point cloud or mesh data.
- Parameters:
- pointsnp.ndarray
New 3D point coordinates.
- normalsnp.ndarray, optional
New normal vectors.
- facesnp.ndarray, optional
New face connectivity indices.
- quaternionsnp.ndarray, optional
New orientation quaternions.
- model
mosaic.parametrization.Parametrization Model fitted to geometry data.
- metadict, optional
New metadata dictionary.
- Returns:
- int
Result of representation change.