Cumulia Illustrator Rendering Engine v2.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
image.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 2025-08-05
15// Version V2.1.0
16//##################################################################################################
17
18#pragma once
19
20#include "typedarray.h"
21
22#include <vector>
23
24namespace cil
25{
27 class Image : public Variant
28 {
29 public:
31 };
32
33 class Image2D final : public Image
34 {
35 private:
36 Uint8Array m_data;
37
38 protected:
41
42 public:
45 Image2D(int width, int height, unsigned char* data = nullptr);
46 Image2D(const Image2D& other);
47 Image2D& operator=(const Image2D& other);
48
49 int width() const;
50 int height() const;
51 unsigned char* data();
52 const unsigned char* data() const;
53 void setData(int width, int height, unsigned char* data = nullptr);
54 void flip();
55 };
56
57 class ImageCube final : public Image
58 {
59 private:
60 std::vector<Image2D> m_images;
61
62 public:
64 ImageCube(const std::vector<Image2D>& images);
65 ImageCube(const ImageCube& other);
66
67 const Image2D& operator[](int index) const;
68 };
69
70 class ImageBuffer : public Image
71 {
72 public:
74 ImageBuffer(const ImageBuffer& other) = delete;
75 };
76
80}
Definition image.h:34
Image2D & operator=(const Image2D &other)
void setData(int width, int height, unsigned char *data=nullptr)
unsigned char * data()
int height() const
int width() const
Image2D()
Contructs a Image object with the specific width and height.
const unsigned char * data() const
int m_height
Definition image.h:40
Image2D(const Image2D &other)
int m_width
Definition image.h:39
Image2D(int width, int height, unsigned char *data=nullptr)
Definition image.h:71
ImageBuffer(const ImageBuffer &other)=delete
Definition image.h:58
ImageCube(const ImageCube &other)
const Image2D & operator[](int index) const
ImageCube(const std::vector< Image2D > &images)
The Image class inherits from the TypedArray class, specilizing the template parameter to unsigned ch...
Definition image.h:28
Definition typedarray.h:122
The Variant class is the most basic class of other mathamatic classes.
Definition variant.h:26
Definition decal.h:23