Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

InheritanceManager.h
1 #pragma once
2 
3 // -- Code from Sketchup SDK sample --
4 
5 #include "GeomUtilities.h"
6 #include <vector>
7 
8 //CInheritanceManager - A cross-platform class that manages the properties
9 //of geometric elements (faces and edges) that can be inherited from component
10 //instances, groups and images. These properties are transformations to world
11 //space, layers and materials.
13 {
14 public:
15 
17  virtual ~CInheritanceManager();
18 
19  void SetTextureWriter(CComPtr<ISkpTextureWriter2> textureWriter);
20  void SetMaterialsByLayer(bool materialsByLayer) { m_bMaterialsByLayer = materialsByLayer; }
21 
22  void PushElement(CComPtr<ISkpComponentInstance> pElement);
23  void PushElement(CComPtr<ISkpGroup> pElement);
24  void PushElement(CComPtr<ISkpImage> pElement);
25  void PushElement(CComPtr<ISkpFace> pElement);
26  void PushElement(CComPtr<ISkpEdge> pElement);
27  void PopElement();
28 
29  CComPtr<ISkpLayer> GetCurrentLayer();
30  CTransform GetCurrentTransform();
31  CComPtr<ISkpMaterial> GetCurrentFrontMaterial();
32  CComPtr<ISkpMaterial> GetCurrentBackMaterial();
33  long GetCurrentTextureHandle();
34 
35 protected: //Methods
36 
37  void PushTransform(CTransform t);
38  void PushTextureHandle(long textureHandle);
39 
40 protected: //Data
41 
42  bool m_bMaterialsByLayer;
43  std::vector<CTransform> m_Transforms;
44  std::vector<ISkpLayer*> m_Layers;
45  std::vector<ISkpMaterial*> m_FrontMaterials;
46  std::vector<ISkpMaterial*> m_BackMaterials;
47  std::vector<long> m_TextureHandles;
48 
49  CComPtr<ISkpTextureWriter2> m_pTextureWriter;
50 };
Definition: InheritanceManager.h:12
Definition: GeomUtilities.h:108