Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / mfc / occtdemo / Textures / Textures_Presentation.h
1 // Textures_Presentation.h: interface for the Textures_Presentation class.
2 // Creation of textural presentation of shape
3 //////////////////////////////////////////////////////////////////////
4
5 #if !defined(AFX_Textures_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_)
6 #define AFX_Textures_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_
7
8 #if _MSC_VER > 1000
9 #pragma once
10 #endif // _MSC_VER > 1000
11
12 #include <OCCDemo_Presentation.h>
13 class TopoDS_Shape;
14 class TCollection_AsciiString;
15
16 class Textures_Presentation : public OCCDemo_Presentation
17 {
18 public:
19   // Construction
20   Textures_Presentation();
21
22 public:
23   // Iteration on samples
24   virtual void DoSample();
25   // one phase of iterations
26
27   virtual void Init();
28
29 private:
30   // display an AIS_TexturedShape based on a given shape with texture with given filename
31   // filename can also be an integer value ("2", "5", etc.), in this case
32   // a predefined texture from Graphic3d_NameOfTexture2D with number = this value
33   // is loaded.
34   // the function returns !WAIT_A_SECOND
35   Standard_Boolean displayTextured(const TopoDS_Shape&, 
36                                    TCollection_AsciiString aTFileName,
37                                    Standard_Boolean toDisplayOrigina = Standard_True,
38                                    Standard_Boolean toScale = Standard_False,
39                                    Standard_Integer nRepeat = 5);
40   
41   // loads a shape from a given brep file from data dir into a given TopoDS_Shape object
42   Standard_Boolean loadShape(TopoDS_Shape&, TCollection_AsciiString);
43
44   // turns 6 diretional lights on/off for brighter demonstration
45   void lightsOnOff(Standard_Boolean isOn);
46
47   // Sample functions
48   void sampleCustomTexture1();
49   void sampleCustomTexture2();
50   void sampleCustomTexture3();
51 //  void samplePredefTexture1();
52 //  void samplePredefTexture2();
53
54 private:
55   // Array of pointers to sample functions
56   typedef void (Textures_Presentation::*PSampleFuncType)();
57   static const PSampleFuncType SampleFuncs[];
58
59 };
60
61 #endif // !defined(AFX_Textures_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_)