API Documentation
Loading...
Searching...
No Matches
GraphicsCameraManager.h
Go to the documentation of this file.
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: Graphics
28File: GraphicsCameraManager
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
36#include "Base/Headers/UUID.h"
38#include "Base/Headers/Time.h"
39namespace NDEVR
40{
41 class GraphicsUpdateArguments;
42 class Camera;
44 {
49 fltp04 dpi = 1.0f;
51
52 bool operator!=(const CameraUniformObject& object) const
53 {
54 return transform != object.transform
55 || origin != object.origin
56 || sun_pos != object.sun_pos
57 || camera_pos != object.camera_pos
58 || dpi != object.dpi
59 || background_color != object.background_color;
60 }
61 };
62
64 {
65 public:
66
69 virtual ~GraphicsCameraManager();
70 void setCamera(const UUID& camera) { m_camera = camera; };
71 void updateUniformBuffer(GraphicsUpdateArguments& args);
72 bool useCameraMaterial() const;
73 UUID overrideMaterial() const { return m_override_material; }
74
75 const CameraUniformObject& uniformObject() const { return m_camera_uniform; }
76
77 protected:
78 CameraUniformObject getCameraUniformObject(const Camera& camera, GraphicsUpdateArguments& args) const;
79
80 protected:
86
91 };
92}
#define NDEVR_GRAPHICS_API
Definition DLLInfo.h:74
Definition GraphicsCameraManager.h:64
void setCamera(const UUID &camera)
Definition GraphicsCameraManager.h:70
UUID m_camera
Definition GraphicsCameraManager.h:88
UUID m_override_material
Definition GraphicsCameraManager.h:89
bool m_use_anisotropy
Definition GraphicsCameraManager.h:83
bool m_use_camera_material
Definition GraphicsCameraManager.h:84
const CameraUniformObject & uniformObject() const
Definition GraphicsCameraManager.h:75
bool m_needs_pipeline_update
Definition GraphicsCameraManager.h:82
Time m_last_updated_time
Definition GraphicsCameraManager.h:90
bool m_uses_origin
Definition GraphicsCameraManager.h:81
UUID overrideMaterial() const
Definition GraphicsCameraManager.h:73
bool m_needs_uniform_commit
Definition GraphicsCameraManager.h:85
CameraUniformObject m_camera_uniform
Definition GraphicsCameraManager.h:87
Definition GraphicsUpdateArguments.h:40
Definition Matrix.hpp:173
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
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
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
Definition GraphicsCameraManager.h:44
fltp04 dpi
Definition GraphicsCameraManager.h:49
Vector< 4, fltp04 > camera_pos
Definition GraphicsCameraManager.h:48
RGBColor background_color
Definition GraphicsCameraManager.h:50
bool operator!=(const CameraUniformObject &object) const
Definition GraphicsCameraManager.h:52
Vector< 4, fltp04 > sun_pos
Definition GraphicsCameraManager.h:47
Matrix< fltp04 > transform
Definition GraphicsCameraManager.h:45
Vector< 4, sint04 > origin
Definition GraphicsCameraManager.h:46
Definition BaseValues.hpp:272