Cumulia Illustrator Rendering Engine v1.1.0
A Rendering engine for industrial CAD/CAE model and optimized for greatest performance
 
Loading...
Searching...
No Matches
decal.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
22namespace cil
23{
24 class Decal : public Node
25 {
26 friend class Decals;
27
28 public:
29 enum class Anchor
30 {
31 TopLeft,
32 Top,
34 Left,
35 Center,
36 Right,
38 Bottom,
40 };
41
42 static std::shared_ptr<Material> OpaqueImageMaterial;
43 static std::shared_ptr<Material> TransparentImageMaterial;
44 static std::shared_ptr<Material> OpaqueTextMaterial;
45 static std::shared_ptr<Material> TransparentTextMaterial;
46 static std::shared_ptr<Material> OpaqueBackgroundMaterial;
47 static std::shared_ptr<Material> TransparentBackgroundMaterial;
48 static std::shared_ptr<Geometry> DecalGeometry;
49 static std::shared_ptr<Geometry> BackgroundGeometry;
50 static std::shared_ptr<Sampler> DecalSampler;
51
52 public:
54 virtual ~Decal();
55
58 Anchor anchor() const;
62
63 protected:
64 std::shared_ptr<Vector3f> m_position;
66 std::shared_ptr<Vector2i> m_offset;
67 std::shared_ptr<Vector2i> m_size;
68 std::shared_ptr<Vector2i> m_globalOffset;
69 };
70}
Definition decal.h:25
std::shared_ptr< Vector2i > m_offset
Definition decal.h:66
Anchor m_anchor
Definition decal.h:65
void setOffset(const Vector2i &offset)
static std::shared_ptr< Geometry > BackgroundGeometry
Definition decal.h:49
std::shared_ptr< Vector3f > m_position
Definition decal.h:64
static std::shared_ptr< Material > TransparentBackgroundMaterial
Definition decal.h:47
static std::shared_ptr< Material > OpaqueImageMaterial
Definition decal.h:42
Vector2i offset() const
Decal(const Vector3f &position)
virtual ~Decal()
Vector3f position() const
Anchor
Definition decal.h:30
static std::shared_ptr< Sampler > DecalSampler
Definition decal.h:50
static std::shared_ptr< Geometry > DecalGeometry
Definition decal.h:48
void setAnchor(Anchor anchor)
void setPosition(const Vector3f &position)
static std::shared_ptr< Material > OpaqueBackgroundMaterial
Definition decal.h:46
static std::shared_ptr< Material > TransparentTextMaterial
Definition decal.h:45
std::shared_ptr< Vector2i > m_size
Definition decal.h:67
static std::shared_ptr< Material > TransparentImageMaterial
Definition decal.h:43
std::shared_ptr< Vector2i > m_globalOffset
Definition decal.h:68
static std::shared_ptr< Material > OpaqueTextMaterial
Definition decal.h:44
Anchor anchor() const
Definition decals.h:27
The Node class represents a node in a scene graph. A scene graph is a hierarchicaldata stucture used ...
Definition node.h:35
The class Vector2i inherits from the templated class of Vector2, and the template parameters are spec...
Definition vector.h:255
The class Vector3f inherits from the templated class of Vector3, and the template parameters are spec...
Definition vector.h:322
Definition decal.h:23