Cumulia Illustrator Rendering Engine v1.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
producer.h
1//##################################################################################################
2//
3// Copyright (c) 2024 Beijing Qiongqi Tech Co.,Ltd. All rights reserved.
4
5// This source code is confidential and proprietary to Beijing Qiongqi Tech Co.,Ltd(The Holder).
6// Any unauthorized use, copying, modification, or distribution of the code is strictly prohibited.
7// Any user shall obtain authorizaition from the Holder before modifying the source code. And the user shall not
8// sublicense, sell, distribute, or transfer the source code, whether in original or modified form, to any third party
9// without the prior written consent of the Holder.
10
11// This copyright notice and permission grant shall be included in all copies or substantial portions of the source code.
12
13// Author Cumulia Illustrator
14// Date 2024-10-31
15// Version V1.1.0
16//##################################################################################################
17
18#pragma once
19
20#include <cilcore.h>
21
22#include <memory>
23#include <string>
24#include <vector>
25
26namespace cil
27{
29 {
30 protected:
31 std::shared_ptr<Renderer> m_renderer;
32 std::shared_ptr<Camera> m_initcamera;
33 std::shared_ptr<Vector2i> m_backgroundSize;
34 std::shared_ptr<Vector2i> m_windowSize;
35 std::shared_ptr<Scene> m_scene;
36 std::shared_ptr<Pass> m_pass;
37
38 public:
39 SelectionProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
41
42 std::shared_ptr<Vector2i> windowSize();
43 void toPixel(int x, int y);
44 void toBox(int x1, int y1, int x2, int y2);
45 void toWindow();
46 void updatePass();
48 };
49
51 {
52 private:
53 std::shared_ptr<ImageBuffer> m_imageBuffer;
54
55 public:
56 EntityProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
57 virtual ~EntityProducer();
58
59 virtual std::shared_ptr<Image2D> produce(const std::shared_ptr<std::vector<std::shared_ptr<Node>>>& nodes);
60 };
61
63 {
64 public:
65 FaceProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
66 virtual ~FaceProducer();
67 };
68
70 {
71 public:
72 VertexProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
73 virtual ~VertexProducer();
74 };
75
77 {
78 public:
79 EdgeProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
80 virtual ~EdgeProducer();
81
82 virtual std::shared_ptr<Image2D> produce(const std::shared_ptr<std::vector<std::shared_ptr<Node>>>& nodes);
83 };
84
86 {
87 private:
88 std::shared_ptr<ImageBuffer> m_imageBuffer0;
89 std::shared_ptr<ImageBuffer> m_imageBuffer1;
90 std::shared_ptr<ImageBuffer> m_imageBuffer2;
91
92 public:
93 AttributeProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
95
96 virtual std::vector<std::shared_ptr<Image2D>> produce(const std::shared_ptr<std::vector<std::shared_ptr<Node>>>& nodes);
97 };
98
100 {
101 public:
102 PositionProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
104 };
105
107 {
108 public:
109 NormalProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
111 };
112
114 {
115 public:
116 PrimitiveProducer(const std::shared_ptr<Renderer>& renderer, const std::shared_ptr<Camera>& camera, const std::shared_ptr<Vector2i>& backgroundSize, const std::shared_ptr<Vector2i>& windowSize);
118 };
119}
Definition producer.h:86
virtual ~AttributeProducer()
AttributeProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
virtual std::vector< std::shared_ptr< Image2D > > produce(const std::shared_ptr< std::vector< std::shared_ptr< Node > > > &nodes)
Definition producer.h:77
EdgeProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
virtual std::shared_ptr< Image2D > produce(const std::shared_ptr< std::vector< std::shared_ptr< Node > > > &nodes)
virtual ~EdgeProducer()
Definition producer.h:51
virtual std::shared_ptr< Image2D > produce(const std::shared_ptr< std::vector< std::shared_ptr< Node > > > &nodes)
EntityProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
virtual ~EntityProducer()
Definition producer.h:63
FaceProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
virtual ~FaceProducer()
Definition producer.h:107
NormalProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
virtual ~NormalProducer()
Definition producer.h:100
virtual ~PositionProducer()
PositionProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
Definition producer.h:114
virtual ~PrimitiveProducer()
PrimitiveProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
Definition producer.h:29
std::shared_ptr< Renderer > m_renderer
Definition producer.h:31
virtual ~SelectionProducer()
std::shared_ptr< Scene > m_scene
Definition producer.h:35
std::shared_ptr< Camera > m_initcamera
Definition producer.h:32
void toBox(int x1, int y1, int x2, int y2)
SelectionProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
void toPixel(int x, int y)
std::shared_ptr< Vector2i > windowSize()
std::shared_ptr< Vector2i > m_backgroundSize
Definition producer.h:33
std::shared_ptr< Vector2i > m_windowSize
Definition producer.h:34
std::shared_ptr< Pass > m_pass
Definition producer.h:36
Definition producer.h:70
VertexProducer(const std::shared_ptr< Renderer > &renderer, const std::shared_ptr< Camera > &camera, const std::shared_ptr< Vector2i > &backgroundSize, const std::shared_ptr< Vector2i > &windowSize)
virtual ~VertexProducer()
Definition decal.h:23