4#include <NDEVR/Polygon.h>
9 class DesignObjectLookup;
14 class ViewToPrimitiveObjects
16 struct PrimitiveClipRegion
18 Polygon<fltp04> polygon;
19 bool operator==(
const PrimitiveClipRegion& region)
const
21 return region.polygon == polygon;
23 bool operator!=(
const PrimitiveClipRegion& region)
const
25 return region.polygon != polygon;
28 struct PrimitiveDrawObject
30 Buffer<PrimitiveClipRegion> clip_region;
36 struct PrimitiveDrawPoint :
public PrimitiveDrawObject
38 Vector<2, fltp04> point;
40 struct PrimitiveDrawLine :
public PrimitiveDrawObject
42 LineSegment<2, fltp04> segment;
44 struct PrimitiveDrawPolygon :
public PrimitiveDrawObject
46 Polygon<fltp04> polygon;
48 struct PrimitiveDrawImagePolygon :
public PrimitiveDrawPolygon
51 Polygon<fltp04> image_polygon;
53 Matrix<fltp08> image_transform = Matrix<fltp08>(1.0);
55 struct PrimitiveDrawText :
public PrimitiveDrawObject
59 Matrix<fltp04, 3, 2> transform;
61 struct PrimitiveRenderOptions
63 Matrix<fltp08> complete_geo_transform;
64 Bounds<3, fltp04> bounds;
70 Buffer<PrimitiveDrawLine> lines;
71 Buffer<PrimitiveDrawPoint> points;
72 Buffer<PrimitiveDrawPolygon> polygons;
73 Buffer<PrimitiveDrawImagePolygon> image_polygons;
74 Buffer<PrimitiveDrawText> text;
75 Dictionary<String, Font> fonts;
76 Matrix<fltp08> camera_transform;
79 ViewToPrimitiveObjects(
const DesignObjectLookup* lookup);
80 void setDrawGrid(
bool draw_grid);
81 void setTitle(
const String& title,
const String& subject);
82 void setMargins(uint04 margins);
83 virtual void setdpi(fltp08 dpi);
84 void setDrawBorder(
bool border);
85 virtual bool execute(
const Camera& camera,
const Buffer<UUID>& objects_to_render, PrimitiveRenderOptions& options);
88 void sortAndDraw(PrimitiveRenderOptions& draw_options);
89 Buffer<PrimitiveClipRegion> getClipping(
const PrimitiveRenderOptions& primitive_options,
const Model& model);
91 void writeTextToOptions(PrimitiveRenderOptions& primitive_options,
const Matrix<fltp08>& tr, Text text);
93 void writeGeometryToOptions(PrimitiveRenderOptions& pdf_options,
const Matrix<fltp08>& tr,
const Model& model,
const Geometry& geo);
95 std::function<void(
const PrimitiveDrawImagePolygon& image_id,
const PrimitiveRenderOptions& pdf_options)> m_draw_image;
96 std::function<void(
const Font& font,
const PrimitiveRenderOptions& pdf_options)> m_add_font;
97 std::function<void(
const PrimitiveDrawPoint& point,
const PrimitiveRenderOptions& pdf_options)> m_draw_point;
98 std::function<void(
const PrimitiveDrawLine& line,
const PrimitiveRenderOptions& pdf_options)> m_draw_line;
99 std::function<void(
const PrimitiveDrawPolygon& poly,
const PrimitiveRenderOptions& pdf_options)> m_draw_poly;
100 std::function<void(
const PrimitiveDrawImagePolygon& image_poly,
const PrimitiveRenderOptions& pdf_options)> m_draw_image_poly;
101 std::function<void(
const PrimitiveDrawText& text,
const PrimitiveRenderOptions& pdf_options)> m_draw_text;
103 const DesignObjectLookup* m_lookup;
bool operator!=(const VkVertexInputAttributeDescription &a, const VkVertexInputAttributeDescription &b)
Definition VulkanRenderObject.cpp:10
bool operator==(const VkVertexInputAttributeDescription &a, const VkVertexInputAttributeDescription &b)
Definition VulkanRenderObject.cpp:18
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_type distance(const t_vertex &vertex, const LineSegment< t_dims, t_type, t_vertex > &line)
Definition Distance.hpp:250
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181