![]() |
NDEVR
API Documentation
|
Logic for automatically zooming a Camera or Viewport to a certain location or having certain objects in focus of the frame. More...
Public Member Functions | |
| AutoZoomFocus () | |
| Default constructor. | |
| AutoZoomFocus (const Buffer< UUID > &models) | |
| Constructs an AutoZoomFocus that targets multiple models. | |
| AutoZoomFocus (const UUID &model) | |
| Constructs an AutoZoomFocus that targets a single model. | |
| AutoZoomFocus (SnapLocation focus) | |
| Constructs an AutoZoomFocus with a specific snap location and no targets. | |
| AutoZoomFocus (SnapLocation focus, const Buffer< UUID > &models) | |
| Constructs an AutoZoomFocus with a snap location targeting multiple models. | |
| AutoZoomFocus (SnapLocation focus, const UUID &model) | |
| Constructs an AutoZoomFocus with a snap location targeting a single model. | |
| void | clear () |
| Resets all members to their default state, clearing targets, bounds, offsets, and snap. | |
| bool | operator!= (const AutoZoomFocus &layout) const |
| Checks inequality between two AutoZoomFocus instances. | |
| bool | operator== (const AutoZoomFocus &layout) const |
| Checks equality between two AutoZoomFocus instances by comparing all members. | |
Public Attributes | |
| Vector< 3, Angle< fltp08 > > | angle_offsets = Vector<3, Angle<fltp08>>(Angle<fltp08>(0)) |
| Angular offsets applied to the camera orientation relative to the snap direction. | |
| Bounds< 3, fltp08 > | bounds = Constant<Bounds<3, fltp08>>::Invalid |
| Optional explicit 3D bounds to zoom to. Invalid means bounds are computed from targets. | |
| fltp08 | bounds_center_tolerance = 1.0 |
| Tolerance for bounds center movement before triggering a camera update, helping prevent jitter. | |
| fltp08 | bounds_edge_tolerance_mult = 0.25 |
| Multiplier for edge tolerance on bounds changes, helping prevent camera jitter. | |
| bool | clear_animations = true |
| Whether to clear any existing camera animations when applying this zoom focus. | |
| Angle< fltp08 > | grip_tolerance = Angle<fltp08>(DEGREES, 0.5) |
| Minimum angular change required before updating the camera, helping prevent jitter. | |
| TimeSpan | lag_time = TimeSpan(1.0) |
| Duration over which the camera animates to the target focus position. | |
| bool | override_camera_lock_invisible = false |
| Whether this zoom focus overrides camera lock when the target is not visible. | |
| bool | override_camera_lock_visible = true |
| Whether this zoom focus overrides camera lock when the target is visible. | |
| bool | override_default_snap = true |
| Whether to override the viewport's default snap location with this one. | |
| SnapLocation | snap = SnapLocation::e_no_snap |
| The directional snap location for the camera view orientation. | |
| Buffer< UUID > | targets |
| The UUIDs of the design objects to keep in focus. | |
| Vector< 3, fltp08 > | transformed_offsets = Vector<3, fltp08>(0.0) |
| Positional offsets applied in the camera's local (transformed) coordinate space. | |
| bool | use_true_extents = true |
| Whether to use precise object extents rather than approximate bounding volumes. | |
| Vector< 3, fltp08 > | worldspace_offsets = Vector<3, fltp08>(0.0) |
| Positional offsets applied in world-space coordinates. | |
| fltp08 | zoom_bounds_expansion = 0.0 |
| Amount to expand the computed zoom bounds, adding padding around focused objects. | |
Logic for automatically zooming a Camera or Viewport to a certain location or having certain objects in focus of the frame.
Definition at line 13 of file ViewportAutoZoomFocus.h.
|
inline |
Default constructor.
Initializes an AutoZoomFocus with no targets and default values.
Definition at line 18 of file ViewportAutoZoomFocus.h.
Referenced by operator!=(), and operator==().
|
inline |
Constructs an AutoZoomFocus that targets a single model.
| [in] | model | The UUID of the model to focus on. |
Definition at line 24 of file ViewportAutoZoomFocus.h.
References targets.
Constructs an AutoZoomFocus that targets multiple models.
| [in] | models | The UUIDs of the models to focus on. |
Definition at line 32 of file ViewportAutoZoomFocus.h.
References targets.
|
inline |
Constructs an AutoZoomFocus with a specific snap location and no targets.
| [in] | focus | The snap location to orient the camera toward. |
Definition at line 40 of file ViewportAutoZoomFocus.h.
References snap.
|
inline |
Constructs an AutoZoomFocus with a snap location targeting multiple models.
| [in] | focus | The snap location to orient the camera toward. |
| [in] | models | The UUIDs of the models to focus on. |
Definition at line 49 of file ViewportAutoZoomFocus.h.
|
inline |
Constructs an AutoZoomFocus with a snap location targeting a single model.
| [in] | focus | The snap location to orient the camera toward. |
| [in] | model | The UUID of the model to focus on. |
Definition at line 59 of file ViewportAutoZoomFocus.h.
References targets.
|
inline |
Resets all members to their default state, clearing targets, bounds, offsets, and snap.
Definition at line 67 of file ViewportAutoZoomFocus.h.
References angle_offsets, bounds, e_no_snap, snap, targets, transformed_offsets, worldspace_offsets, and zoom_bounds_expansion.
|
inline |
Checks inequality between two AutoZoomFocus instances.
| [in] | layout | The other AutoZoomFocus to compare against. |
Definition at line 116 of file ViewportAutoZoomFocus.h.
References AutoZoomFocus().
|
inline |
Checks equality between two AutoZoomFocus instances by comparing all members.
| [in] | layout | The other AutoZoomFocus to compare against. |
layout instead of this, which looks like a potential bug. Definition at line 86 of file ViewportAutoZoomFocus.h.
References AutoZoomFocus(), angle_offsets, bounds, grip_tolerance, lag_time, snap, targets, transformed_offsets, use_true_extents, worldspace_offsets, and zoom_bounds_expansion.