1 // TexturesExt_Presentation.h: interface for the TexturesExt_Presentation class.
2 // Creation of textural presentation of shape
3 //////////////////////////////////////////////////////////////////////
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_
10 #endif // _MSC_VER > 1000
12 #include "OCCDemo_Presentation.h"
14 class TCollection_AsciiString;
15 class Handle_AIS_TexturedShape;
17 class TexturesExt_Presentation : public OCCDemo_Presentation
21 TexturesExt_Presentation();
24 // Iteration on samples
25 virtual void DoSample();
26 // one phase of iterations
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
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);
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);
44 // turns 6 diretional lights on/off for brighter demonstration
45 void lightsOnOff(Standard_Boolean isOn);
53 // Array of pointers to sample functions
54 typedef void (TexturesExt_Presentation::*PSampleFuncType)();
55 static const PSampleFuncType SampleFuncs[];
59 #endif // !defined(AFX_TexturesExt_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_)