You.i Engine
YiMask.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_MASK_H_
3 #define _YI_MASK_H_
4 
5 #include "asset/YiAssetTexture.h"
6 #include "renderer/YiMesh.h"
7 #include "renderer/YiMaterial.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 
46 protected:
47  std::shared_ptr<CYIMesh> m_pMesh;
48  std::shared_ptr<CYIMaterial> m_pMaterial;
49  glm::mat4 m_ModelMatrix;
50  glm::mat4 m_Transform;
51 };
52 
55 #endif // _YI_MASK_H_
void SetTransform(const glm::mat4 &maskTransform)
const std::shared_ptr< CYIMaterial > GetMaterial() const
void CalculateModelMatrix(const glm::mat4 &worldTransform)
glm::mat4 m_ModelMatrix
Definition: YiMask.h:49
Adds a masking effect to a scene node.
Definition: YiMask.h:18
glm::mat4 m_Transform
Definition: YiMask.h:50
const std::shared_ptr< CYIMesh > & GetMesh() const
const glm::mat4 & GetTransform() const
const glm::mat4 & GetModelMatrix() const
std::shared_ptr< CYIMesh > m_pMesh
Definition: YiMask.h:47
virtual ~CYIMask()
void SetImage(const std::shared_ptr< CYIAssetTexture > &pTextureAsset)
std::shared_ptr< CYIMaterial > m_pMaterial
Definition: YiMask.h:48