You.i Engine
YiMask.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_MASK_H_
3 #define _YI_MASK_H_
4 
5 #include "asset/YiAssetTexture.h"
6 #include "renderer/YiMaterial.h"
7 #include "renderer/YiMesh.h"
8 
18 class CYIMask
19 {
20 public:
21  CYIMask();
22  virtual ~CYIMask();
23 
27  void SetImage(const std::shared_ptr<CYIAssetTexture> &pTextureAsset);
28 
32  const std::shared_ptr<CYIMesh> &GetMesh() const;
33 
37  const std::shared_ptr<CYIMaterial> &GetMaterial() const;
38 
39  void SetTransform(const glm::mat4 &maskTransform);
40  const glm::mat4 &GetTransform() const;
41 
42  void CalculateModelMatrix(const glm::mat4 &worldTransform);
43  const glm::mat4 &GetModelMatrix() const;
44 
45 protected:
46  std::shared_ptr<CYIMesh> m_pMesh;
47  std::shared_ptr<CYIMaterial> m_pMaterial;
48  glm::mat4 m_ModelMatrix;
49  glm::mat4 m_Transform;
50 };
51 
54 #endif // _YI_MASK_H_
void SetTransform(const glm::mat4 &maskTransform)
const glm::mat4 & GetModelMatrix() const
void CalculateModelMatrix(const glm::mat4 &worldTransform)
glm::mat4 m_ModelMatrix
Definition: YiMask.h:48
Adds a masking effect to a scene node.
Definition: YiMask.h:18
glm::mat4 m_Transform
Definition: YiMask.h:49
const glm::mat4 & GetTransform() const
std::shared_ptr< CYIMesh > m_pMesh
Definition: YiMask.h:46
virtual ~CYIMask()
void SetImage(const std::shared_ptr< CYIAssetTexture > &pTextureAsset)
const std::shared_ptr< CYIMesh > & GetMesh() const
std::shared_ptr< CYIMaterial > m_pMaterial
Definition: YiMask.h:47
const std::shared_ptr< CYIMaterial > & GetMaterial() const