You.i Engine
YiBifThumbnails.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_BIF_THUMBNAILS_H_
3 #define _YI_BIF_THUMBNAILS_H_
4 
5 #include "asset/YiBifParser.h"
6 #include "framework/YiPredef.h"
7 #include "player/YiThumbnails.h"
8 
9 #include <memory>
10 
11 class CYIAssetTexture;
12 class IYIGPUObject;
13 class CYIAssetBif;
14 
27 {
28 public:
29  CYIBifThumbnails(CYIImageView *pThumbnailNode);
30  virtual ~CYIBifThumbnails();
31 
32  virtual void Init(const CYIString &path) override;
36  void Init(const std::shared_ptr<CYIAssetBif> &pBif);
37 
38  virtual void Update(uint64_t time) override;
39 
40 private:
41  void Reset();
42 
43  void BuildThumbnailNode();
44  void GetThumbnailProperties();
45 
46  // Hold on to the asset:
47  std::shared_ptr<CYIAssetBif> m_pAssetBif;
48  std::shared_ptr<CYIBif> m_pParser;
49 
50  uint32_t m_width;
51  uint32_t m_height;
52 
53  std::shared_ptr<CYIAssetTexture> m_pBifTexture;
54 
55  size_t m_currentIndex; // Current thumbnail index from Bif file
56  // that is uploaded as Texture in the ThumbnailNode.
57 };
58 
63 #endif
Asset representing BIF files.
Definition: YiAssetBif.h:21
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:36
A texture asset representing an image which will be loaded into the GPU.
Definition: YiAssetTexture.h:22
virtual void Init(const CYIString &path) override
A simple view which downloads and renders images.
Definition: YiImageView.h:97
virtual void Update(uint64_t time) override
CYIBifThumbnails(CYIImageView *pThumbnailNode)
An interface for managing GPU-bound objects such as shaders and textures.
Definition: YiGPUObject.h:18
Provides an interface for thumbnail implementations.
Definition: YiThumbnails.h:19
Implementation of thumbnails using BIF file format.
Definition: YiBifThumbnails.h:26
virtual ~CYIBifThumbnails()