NDEVR
API Documentation
AutoZoomFocus

Logic for automatically zooming a Camera or Viewport to a certain location or having certain objects in focus of the frame. More...

Collaboration diagram for AutoZoomFocus:
[legend]

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, fltp08bounds = 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< fltp08grip_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< UUIDtargets
 The UUIDs of the design objects to keep in focus.
Vector< 3, fltp08transformed_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, fltp08worldspace_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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ AutoZoomFocus() [1/6]

AutoZoomFocus::AutoZoomFocus ( )
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==().

◆ AutoZoomFocus() [2/6]

AutoZoomFocus::AutoZoomFocus ( const UUID & model)
inline

Constructs an AutoZoomFocus that targets a single model.


Parameters
[in]modelThe UUID of the model to focus on.

Definition at line 24 of file ViewportAutoZoomFocus.h.

References targets.

◆ AutoZoomFocus() [3/6]

AutoZoomFocus::AutoZoomFocus ( const Buffer< UUID > & models)
inline

Constructs an AutoZoomFocus that targets multiple models.


Parameters
[in]modelsThe UUIDs of the models to focus on.

Definition at line 32 of file ViewportAutoZoomFocus.h.

References targets.

◆ AutoZoomFocus() [4/6]

AutoZoomFocus::AutoZoomFocus ( SnapLocation focus)
inline

Constructs an AutoZoomFocus with a specific snap location and no targets.


Parameters
[in]focusThe snap location to orient the camera toward.

Definition at line 40 of file ViewportAutoZoomFocus.h.

References snap.

◆ AutoZoomFocus() [5/6]

AutoZoomFocus::AutoZoomFocus ( SnapLocation focus,
const Buffer< UUID > & models )
inline

Constructs an AutoZoomFocus with a snap location targeting multiple models.


Parameters
[in]focusThe snap location to orient the camera toward.
[in]modelsThe UUIDs of the models to focus on.

Definition at line 49 of file ViewportAutoZoomFocus.h.

References snap, and targets.

◆ AutoZoomFocus() [6/6]

AutoZoomFocus::AutoZoomFocus ( SnapLocation focus,
const UUID & model )
inline

Constructs an AutoZoomFocus with a snap location targeting a single model.


Parameters
[in]focusThe snap location to orient the camera toward.
[in]modelThe UUID of the model to focus on.

Definition at line 59 of file ViewportAutoZoomFocus.h.

References targets.

Member Function Documentation

◆ clear()

void AutoZoomFocus::clear ( )
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.

◆ operator!=()

bool AutoZoomFocus::operator!= ( const AutoZoomFocus & layout) const
inline

Checks inequality between two AutoZoomFocus instances.


Parameters
[in]layoutThe other AutoZoomFocus to compare against.
Returns
True if the instances differ in any member, false otherwise.

Definition at line 116 of file ViewportAutoZoomFocus.h.

References AutoZoomFocus().

◆ operator==()

bool AutoZoomFocus::operator== ( const AutoZoomFocus & layout) const
inline

Checks equality between two AutoZoomFocus instances by comparing all members.


Parameters
[in]layoutThe other AutoZoomFocus to compare against.
Returns
True if all members are equal, false otherwise.
Note
The bounds comparison uses memcmp, which may be intentional for bitwise equality but the second argument appears to reference 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.


The documentation for this struct was generated from the following file: