CameraPosition#
- class ansys.result_explorer.core.CameraPosition(matrix: list[float])#
Human-readable wrapper for a 4x4 camera matrix.
The matrix is stored row-major as 16 values:
[ right.x right.y right.z tx ] [ up.x up.y up.z ty ] [ fwd.x fwd.y fwd.z tz ] [ 0 0 0 w ]
Methods
View parallel to XY plane, looking from -Z (Ansys Mechanical convention).
View parallel to XZ plane, looking from -Y (Ansys Mechanical convention).
View parallel to XY plane, looking from +Z (Ansys Mechanical convention).
Return standard isometric view (+X+Y+Z corner, Y up).
View parallel to YZ plane, looking from -X (Ansys Mechanical convention).
View parallel to YZ plane, looking from +X (Ansys Mechanical convention).
CameraPosition.rotate_x(degrees)Return a new CameraPosition rotated degrees around the world X axis.
CameraPosition.rotate_y(degrees)Return a new CameraPosition rotated degrees around the world Y axis.
CameraPosition.rotate_z(degrees)Return a new CameraPosition rotated degrees around the world Z axis.
View parallel to XZ plane, looking from +Y (Ansys Mechanical convention).
CameraPosition.with_translation(tx, ty, tz)Return a copy of this CameraPosition with new translation values.
CameraPosition.with_zoom(zoom)Return a copy of this CameraPosition with a new zoom value.
Attributes
Camera forward (Z-axis) direction.
Raw 16-element row-major matrix.
Camera right (X-axis) direction.
Camera translation (tx, ty, tz) stored in matrix[3], [7], [11].
Camera up (Y-axis) direction.
Zoom / scale factor stored in matrix[15].