NDEVR
API Documentation
ModelOrientationEditor.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: QModelViewCapture
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/QTModelManager.h>
34#include <NDEVR/OrientationEditor.h>
35#include <NDEVR/SnapLocation.h>
36
37namespace NDEVR
38{
43 {
44 Q_OBJECT
45 public:
50 explicit ModelOrientationEditor(QWidget* parent = nullptr);
59 void setManager(QTModelManager* manager);
64 void setTargetObject(const UUID& object);
70 void setTargetObject(uint01 axis, const UUID& object);
75 void setIncludedObjects(const Buffer<UUID>& objects);
81 void setIncludedObject(uint01 axis, const Buffer<UUID>& objects);
86 protected slots:
92 protected:
98 UUID getUUID(uint01 axis) const;
103 void makeRequest(uint01 axis);
105 Vector<3, UUID> m_target_objects = { Constant<UUID>::Invalid, Constant<UUID>::Invalid, Constant<UUID>::Invalid };
110 };
111}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
void makeRequest(uint01 axis)
Issues a capture request for the given axis orientation view.
void objectsUpdatedSlot(Buffer< UUID > id)
Slot called when scene objects are updated, refreshing affected orientation views.
Vector< 3, UUID > m_target_objects
Target object UUIDs per axis.
UUID getUUID(uint01 axis) const
Returns the target object UUID for the given axis.
void setIncludedObject(uint01 axis, const Buffer< UUID > &objects)
Sets the included objects for a specific orientation axis.
void setTargetObject(const UUID &object)
Sets the target object for all orientation axes.
Vector< 3, SnapLocation > target_snaps
Snap locations for each axis orientation view.
QTModelManager * m_manager
The model manager providing scene data.
void setIncludedObjects(const Buffer< UUID > &objects)
Sets the included objects for all orientation axes.
void updateFromModel()
Updates the orientation preview images from the current model state.
Buffer< UUID > m_included_objects
Shared included objects for all axis views.
Buffer< DynamicPointer< CaptureRequest > > m_pending_requests
Outstanding capture requests for orientation previews.
virtual ~ModelOrientationEditor()
Destroys the model orientation editor and releases resources.
void setTargetObject(uint01 axis, const UUID &object)
Sets the target object for a specific orientation axis.
ModelOrientationEditor(QWidget *parent=nullptr)
Constructs the model orientation editor.
void setManager(QTModelManager *manager)
Sets the model manager used for querying and updating models.
Vector< 3, Buffer< UUID > > m_unique_included_objects
Per-axis included object UUIDs.
OrientationEditor(QWidget *parent=nullptr)
Constructs an OrientationEditor widget.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
Definition Vector.hpp:62
The primary namespace for the NDEVR SDK.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
@ e_right_wo_yaw
Right-side view with yaw locked (no yaw rotation).
@ e_front_wo_pitch_yaw
Front-facing view with both pitch and yaw locked.
@ e_top_down_snap
Top-down (plan) view looking straight down.