0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / VrmlConverter / VrmlConverter_Projector.hxx
1 // Created on: 1997-06-06
2 // Created by: Alexander BRIVIN
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _VrmlConverter_Projector_HeaderFile
18 #define _VrmlConverter_Projector_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <HLRAlgo_Projector.hxx>
24 #include <Vrml_PerspectiveCamera.hxx>
25 #include <Vrml_OrthographicCamera.hxx>
26 #include <Vrml_DirectionalLight.hxx>
27 #include <Vrml_PointLight.hxx>
28 #include <Vrml_SpotLight.hxx>
29 #include <VrmlConverter_TypeOfCamera.hxx>
30 #include <VrmlConverter_TypeOfLight.hxx>
31 #include <Vrml_MatrixTransform.hxx>
32 #include <Standard_Transient.hxx>
33 #include <TopTools_Array1OfShape.hxx>
34 #include <Standard_OStream.hxx>
35 class HLRAlgo_Projector;
36
37
38 class VrmlConverter_Projector;
39 DEFINE_STANDARD_HANDLE(VrmlConverter_Projector, Standard_Transient)
40
41
42 //! defines projector  and calculates properties of cameras and lights from Vrml
43 //! ( OrthograpicCamera, PerspectiveCamera, DirectionalLight, PointLight, SpotLight
44 //! and  MatrixTransform  )  to display all scene  shapes  with  arbitrary locations
45 //! for requested the Projection Vector,  High Point Direction and the Focus
46 //! and adds them ( method Add ) to anOSream.
47 class VrmlConverter_Projector : public Standard_Transient
48 {
49
50 public:
51
52   
53   Standard_EXPORT VrmlConverter_Projector(const TopTools_Array1OfShape& Shapes, const Standard_Real Focus, const Standard_Real DX, const Standard_Real DY, const Standard_Real DZ, const Standard_Real XUp, const Standard_Real YUp, const Standard_Real ZUp, const VrmlConverter_TypeOfCamera Camera = VrmlConverter_NoCamera, const VrmlConverter_TypeOfLight Light = VrmlConverter_NoLight);
54   
55   Standard_EXPORT void SetCamera (const VrmlConverter_TypeOfCamera aCamera);
56   
57   Standard_EXPORT VrmlConverter_TypeOfCamera Camera() const;
58   
59   Standard_EXPORT void SetLight (const VrmlConverter_TypeOfLight aLight);
60   
61   Standard_EXPORT VrmlConverter_TypeOfLight Light() const;
62   
63
64   //! Adds  into anOStream  if  they  are  defined in  Create.
65   //! PerspectiveCamera,
66   //! OrthographicCamera,
67   //! DirectionLight,
68   //! PointLight,
69   //! SpotLight
70   //! with  MatrixTransform  from VrmlConverter;
71   Standard_EXPORT void Add (Standard_OStream& anOStream) const;
72   
73   Standard_EXPORT HLRAlgo_Projector Projector() const;
74
75   DEFINE_STANDARD_RTTIEXT(VrmlConverter_Projector,Standard_Transient)
76
77 private:
78
79
80   HLRAlgo_Projector myProjector;
81   Vrml_PerspectiveCamera myPerspectiveCamera;
82   Vrml_OrthographicCamera myOrthographicCamera;
83   Vrml_DirectionalLight myDirectionalLight;
84   Vrml_PointLight myPointLight;
85   Vrml_SpotLight mySpotLight;
86   VrmlConverter_TypeOfCamera myTypeOfCamera;
87   VrmlConverter_TypeOfLight myTypeOfLight;
88   Vrml_MatrixTransform myMatrixTransform;
89
90
91 };
92
93 #endif // _VrmlConverter_Projector_HeaderFile