API Documentation
Loading...
Searching...
No Matches
ViewportAutoZoomFocus.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/AutoZoomFocus.h>
3#include <NDEVR/TimeSpan.h>
4#include <NDEVR/UUID.h>
5#include <NDEVR/Buffer.h>
6#include <NDEVR/Bounds.h>
7#include <NDEVR/Angle.h>
8namespace NDEVR
9{
10 /**--------------------------------------------------------------------------------------------------
11 Class: AutoZoomFocus
12
13 \brief Logic for automatically zooming a Camera or Viewport to a certain location or having certain objects in focus of the frame.
14 *-----------------------------------------------------------------------------------------------**/
16 {
18 AutoZoomFocus(const UUID& model)
19 : targets({ model })
20 {};
22 : targets(models)
23 {};
25 : snap(focus)
26 {};
28 : targets(models)
29 , snap(focus)
30 {};
31 AutoZoomFocus(SnapLocation focus, const UUID& model)
32 : targets({ model })
33 , snap(focus)
34 {};
45 bool operator==(const AutoZoomFocus& layout) const
46 {
47 if (layout.targets != targets)
48 return false;
49 if (memcmp(&layout.bounds, &layout, sizeof(Bounds<3, fltp08>)) != 0)
50 return false;
51 if (layout.angle_offsets != angle_offsets)
52 return false;
54 return false;
56 return false;
57 if (layout.snap != snap)
58 return false;
60 return false;
61 if (layout.lag_time != lag_time)
62 return false;
63 if (layout.grip_tolerance != grip_tolerance)
64 return false;
66 return false;
67 return true;
68 }
69 bool operator!=(const AutoZoomFocus& layout) const
70 {
71 return !(layout == *this);
72 }
81 Angle<fltp08> grip_tolerance = Angle<fltp08>(DEGREES, 0.5);//can help prevent camera jitter
82 fltp08 bounds_edge_tolerance_mult = 0.25;//can help prevent camera jitter
83 fltp08 bounds_center_tolerance = 1.0;//can help prevent camera jitter
84 bool use_true_extents = true;
85 bool clear_animations = true;
89 };
90}
Stores an angle in an optimized format.
Definition StringStream.h:352
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition TimeSpan.h:40
Definition UUID.h:66
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
Definition ACIColor.h:37
SnapLocation
Definition ViewLocation.h:37
@ DEGREES
Definition Angle.h:66
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Logic for automatically zooming a Camera or Viewport to a certain location or having certain objects ...
Definition ViewportAutoZoomFocus.h:16
AutoZoomFocus(SnapLocation focus, const Buffer< UUID > &models)
Definition ViewportAutoZoomFocus.h:27
Bounds< 3, fltp08 > bounds
Definition ViewportAutoZoomFocus.h:74
AutoZoomFocus(SnapLocation focus)
Definition ViewportAutoZoomFocus.h:24
AutoZoomFocus(const UUID &model)
Definition ViewportAutoZoomFocus.h:18
bool override_camera_lock_visible
Definition ViewportAutoZoomFocus.h:86
bool clear_animations
Definition ViewportAutoZoomFocus.h:85
fltp08 bounds_edge_tolerance_mult
Definition ViewportAutoZoomFocus.h:82
fltp08 zoom_bounds_expansion
Definition ViewportAutoZoomFocus.h:79
Angle< fltp08 > grip_tolerance
Definition ViewportAutoZoomFocus.h:81
bool override_camera_lock_invisible
Definition ViewportAutoZoomFocus.h:87
bool operator==(const AutoZoomFocus &layout) const
Definition ViewportAutoZoomFocus.h:45
TimeSpan lag_time
Definition ViewportAutoZoomFocus.h:80
Vector< 3, fltp08 > transformed_offsets
Definition ViewportAutoZoomFocus.h:76
AutoZoomFocus()
Definition ViewportAutoZoomFocus.h:17
bool override_default_snap
Definition ViewportAutoZoomFocus.h:88
bool operator!=(const AutoZoomFocus &layout) const
Definition ViewportAutoZoomFocus.h:69
AutoZoomFocus(SnapLocation focus, const UUID &model)
Definition ViewportAutoZoomFocus.h:31
Vector< 3, Angle< fltp08 > > angle_offsets
Definition ViewportAutoZoomFocus.h:75
Vector< 3, fltp08 > worldspace_offsets
Definition ViewportAutoZoomFocus.h:77
SnapLocation snap
Definition ViewportAutoZoomFocus.h:78
fltp08 bounds_center_tolerance
Definition ViewportAutoZoomFocus.h:83
Buffer< UUID > targets
Definition ViewportAutoZoomFocus.h:73
void clear()
Definition ViewportAutoZoomFocus.h:35
AutoZoomFocus(const Buffer< UUID > &models)
Definition ViewportAutoZoomFocus.h:21
bool use_true_extents
Definition ViewportAutoZoomFocus.h:84
Definition BaseValues.hpp:272