Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / mfc / standard / 04_Viewer3d / src / TexturesExt_Presentation.h
1 // TexturesExt_Presentation.h: interface for the TexturesExt_Presentation class.
2 // Creation of textural presentation of shape
3 //////////////////////////////////////////////////////////////////////
4
5 #if !defined(AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_)
6 #define AFX_TexturesExt_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 class Handle_AIS_TexturedShape;
16
17 class TexturesExt_Presentation : public OCCDemo_Presentation
18 {
19 public:
20   // Construction
21   TexturesExt_Presentation();
22
23 public:
24   // Iteration on samples
25   virtual void DoSample();
26   // one phase of iterations
27
28   virtual void Init();
29
30 private:
31   // display an AIS_TexturedShape based on a given shape with texture with given filename
32   // filename can also be an integer value ("2", "5", etc.), in this case
33   // a predefined texture from Graphic3d_NameOfTexture2D with number = this value
34   // is loaded.
35   Handle_AIS_TexturedShape Texturize(
36     const TopoDS_Shape& aShape, TCollection_AsciiString aTFileName, 
37     Standard_Real toScaleU=1.0, Standard_Real toScaleV=1.0, 
38     Standard_Real toRepeatU=1.0, Standard_Real toRepeatV=1.0,
39     Standard_Real originU=0.0, Standard_Real originV=0.0);
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 sampleBottle();
49   void sampleTerrain();
50   void sampleKitchen();
51
52 private:
53   // Array of pointers to sample functions
54   typedef void (TexturesExt_Presentation::*PSampleFuncType)();
55   static const PSampleFuncType SampleFuncs[];
56
57 };
58
59 #endif // !defined(AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_)