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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _VrmlConverter_Projector_HeaderFile
18 #define _VrmlConverter_Projector_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
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;
38 class VrmlConverter_Projector;
39 DEFINE_STANDARD_HANDLE(VrmlConverter_Projector, Standard_Transient)
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
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);
55 Standard_EXPORT void SetCamera (const VrmlConverter_TypeOfCamera aCamera);
57 Standard_EXPORT VrmlConverter_TypeOfCamera Camera() const;
59 Standard_EXPORT void SetLight (const VrmlConverter_TypeOfLight aLight);
61 Standard_EXPORT VrmlConverter_TypeOfLight Light() const;
64 //! Adds into anOStream if they are defined in Create.
65 //! PerspectiveCamera,
66 //! OrthographicCamera,
70 //! with MatrixTransform from VrmlConverter;
71 Standard_EXPORT void Add (Standard_OStream& anOStream) const;
73 Standard_EXPORT HLRAlgo_Projector Projector() const;
75 DEFINE_STANDARD_RTTIEXT(VrmlConverter_Projector,Standard_Transient)
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;
93 #endif // _VrmlConverter_Projector_HeaderFile