35#include <NDEVR/Model.h>
36#include <NDEVR/Camera.h>
37#include <NDEVR/TranslatedString.h>
38#include <NDEVR/Vector.h>
39#include <NDEVR/StringEnum.h>
231 fltp04 yScaleFactor()
const;
237 #define PAPERVIEW_PARAMS(X) \
247 NDEVR_DEFINE_STRING_STREAM(PaperViewProperty, PAPERVIEW_PARAMS)
275 template<PaperViewProperty t_property,
class t_value_type>
278 if constexpr (t_property == PaperViewProperty::e_margins)
280 else if constexpr (t_property == PaperViewProperty::e_page_size)
282 else if constexpr (t_property == PaperViewProperty::e_world_bounds)
284 else if constexpr (t_property == PaperViewProperty::e_dots_per_meter)
293 template<PaperViewProperty t_property>
296 if constexpr (t_property == PaperViewProperty::e_margins)
298 else if constexpr (t_property == PaperViewProperty::e_page_size)
300 else if constexpr (t_property == PaperViewProperty::e_world_bounds)
302 else if constexpr (t_property == PaperViewProperty::e_dots_per_meter)
311 template<PaperViewProperty t_property,
class t_value_type>
A specification of upper and lower bounds in N-dimensions.
The equivelent of std::vector but with a bit more control.
Base information class for all design objects in the NDEVR property database.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Templated logic for doing matrix multiplication.
A core class that represents a node on model hierarchy.
Vector< 3, fltp08 > size() const
Returns the size (extents) of the model's bounding box.
Model()
Default constructor. Creates an uninitialized Model.
Represents a paper/print layout view within the design, wrapping a Model with page-size,...
Vector< 2, fltp04 > innerPaperSize() const
Returns the inner (printable area) paper size, excluding margins.
PaperView(const Model &model)
Constructs a PaperView from an existing Model.
void setPaperSize(Vector< 2, fltp04 > size)
Sets the overall paper size (width and height).
static constexpr StringView TypeName()
Returns the type name identifier for this class.
void setDotsPerMeter(fltp04 weight)
Sets the resolution in dots per meter.
Vector< 2, fltp04 > paperSize() const
Returns the overall paper size.
Vector< 4, fltp04 > margins() const
Returns the page margins.
void setupViewportForCapture(const DynamicPointer< Camera > &camera)
Configures the given camera's viewport for high-resolution capture/export.
Model outerPage() const
Returns the outer page sub-model (the full paper sheet including margins).
void setupViewportForUser(const DynamicPointer< Camera > &camera)
Configures the given camera's viewport for interactive on-screen display.
Bounds< 3, fltp08 > worldBounds() const
Returns the world-space bounds associated with this paper view.
void setWorldBounds(Bounds< 3, fltp08 > bounds)
Sets the world-space bounds that this paper view encompasses.
static Vector< 4, fltp04 > DefaultMarginsFor(const Vector< 2, fltp04 > &page_size)
Computes default margins appropriate for a given page size.
static const Buffer< std::pair< TranslatedString, Vector< 2, fltp04 > > > & PaperSizes()
Returns a list of standard paper sizes with their translated display names.
Bounds< 3, fltp08 > captureBounds() const
Returns the bounding region used for capture/export rendering.
void setInnerPaperSize(Vector< 2, fltp04 > size)
Sets the inner (printable area) paper size, excluding margins.
fltp04 dotsPerMeter() const
Returns the current resolution in dots per meter.
Model innerPage() const
Returns the inner page sub-model (the printable content area).
void setMargins(Vector< 4, fltp04 > margin)
Sets the page margins.
Matrix< fltp08 > captureViewMatrix() const
Returns the view matrix used for capture rendering.
static void Set(DesignInfo *object, const t_value_type &value)
Sets a PaperViewProperty value on the given design object.
static decltype(auto) Get(const DesignInfo *object)
Gets a PaperViewProperty value from the given design object (typed overload).
static decltype(auto) Get(const DesignInfo *object)
Gets a PaperViewProperty value from the given design object.
Typed interface for getting and setting design object properties by enum.
Represents a color in the RGB space with optional alpha transparency.
Logic for reading or writing to a string or a user friendly, TranslatedString.
The core String View class for the NDEVR API.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Maps a compile-time property enum value to its corresponding C++ storage type.