API Documentation
Loading...
Searching...
No Matches
GraphicsUpdateArguments.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: UpdateArguments
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
36namespace NDEVR
37{
38 class Image;
39 /**--------------------------------------------------------------------------------------------------
40 \brief Options that are used for performing an update on a Graphics Engine call.
41 **/
43 {
44 public:
47 bool needsPipelineRecreation() const { return m_needs_model_recreation || m_needs_pipeline_recreation; }
48 bool isDrawing() const;
51 bool needsModelRecreation() const { return m_needs_model_recreation; }
52 void setModelRecreation(bool needed);
53 void setScreenDrawAll(bool screen_draw)
54 {
55 for (auto it = needs_screen_draw.begin(); it != needs_screen_draw.end(); ++it)
56 it.value() = screen_draw;
57 }
58 bool shouldDraw(const UUID& id) const
59 {
60 if (visible_items.isNull())
61 return true;
62 auto value = visible_items->find(id);
63 if (value == visible_items->end())
64 return false;
65 return value.value();//only return for visible items
66 }
72 RGBColor background_color = RGBColor(255, 255, 255, 255);
78 void* frame_image_resource = nullptr;
82 uint04 frame_count = 0U;
83 uint04 current_khr_index = Constant<uint04>::Invalid;
84 Image* grab_image = nullptr;
86 protected:
89 };
90}
#define NDEVR_GRAPHICS_API
Definition DLLInfo.h:56
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
Definition GraphicsPipeline.h:42
A core class where all Design Objects including models, materials, and geometries are stored....
Definition DesignObjectLookup.h:65
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
A physical or virtual device used with the NDEVR Rendering Engine. A device contains System specific ...
Definition GraphicsDevice.h:12
Options that are used for performing an update on a Graphics Engine call.
Definition GraphicsUpdateArguments.h:43
GraphicsDevice * device
Definition GraphicsUpdateArguments.h:69
bool m_needs_pipeline_recreation
Definition GraphicsUpdateArguments.h:87
fltp04 depth_bias
Definition GraphicsUpdateArguments.h:80
ProgressInfo * log
Definition GraphicsUpdateArguments.h:67
bool m_needs_model_recreation
Definition GraphicsUpdateArguments.h:88
ConstPointer< Dictionary< UUID, bool > > visible_items
Definition GraphicsUpdateArguments.h:75
Vector< 2, uint04 > window_size
Definition GraphicsUpdateArguments.h:77
UUID camera
Definition GraphicsUpdateArguments.h:70
bool shouldDraw(const UUID &id) const
Definition GraphicsUpdateArguments.h:58
bool needsPipelineRecreation() const
Definition GraphicsUpdateArguments.h:47
Time refresh_command_time
Definition GraphicsUpdateArguments.h:73
Dictionary< UUID, bool > needs_screen_draw
Definition GraphicsUpdateArguments.h:74
bool needsModelRecreation() const
Definition GraphicsUpdateArguments.h:51
DesignObjectLookup * lookup
Definition GraphicsUpdateArguments.h:68
Time frame_time
Definition GraphicsUpdateArguments.h:71
void setModelRecreation(bool needed)
Material override_material
Definition GraphicsUpdateArguments.h:79
void setScreenDrawAll(bool screen_draw)
Definition GraphicsUpdateArguments.h:53
uint04 multisample_count
Definition GraphicsUpdateArguments.h:76
bool is_grab_image
Definition GraphicsUpdateArguments.h:85
A root class that stores an an array of pixel data that can be displayed as an Image.
Definition Image.h:40
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
Definition Material.h:51
A light-weight base class for Log that allows processes to update, without the need for additional in...
Definition ProgressInfo.hpp:48
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233