Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:32

0001 // Created on: 1997-06-06
0002 // Created by: Alexander BRIVIN
0003 // Copyright (c) 1997-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _VrmlConverter_Projector_HeaderFile
0018 #define _VrmlConverter_Projector_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <HLRAlgo_Projector.hxx>
0024 #include <Vrml_PerspectiveCamera.hxx>
0025 #include <Vrml_OrthographicCamera.hxx>
0026 #include <Vrml_DirectionalLight.hxx>
0027 #include <Vrml_PointLight.hxx>
0028 #include <Vrml_SpotLight.hxx>
0029 #include <VrmlConverter_TypeOfCamera.hxx>
0030 #include <VrmlConverter_TypeOfLight.hxx>
0031 #include <Vrml_MatrixTransform.hxx>
0032 #include <Standard_Transient.hxx>
0033 #include <TopTools_Array1OfShape.hxx>
0034 #include <Standard_OStream.hxx>
0035 
0036 
0037 class VrmlConverter_Projector;
0038 DEFINE_STANDARD_HANDLE(VrmlConverter_Projector, Standard_Transient)
0039 
0040 
0041 //! defines projector  and calculates properties of cameras and lights from Vrml
0042 //! ( OrthograpicCamera, PerspectiveCamera, DirectionalLight, PointLight, SpotLight
0043 //! and  MatrixTransform  )  to display all scene  shapes  with  arbitrary locations
0044 //! for requested the Projection Vector,  High Point Direction and the Focus
0045 //! and adds them ( method Add ) to anOSream.
0046 class VrmlConverter_Projector : public Standard_Transient
0047 {
0048 
0049 public:
0050 
0051   
0052   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);
0053   
0054   Standard_EXPORT void SetCamera (const VrmlConverter_TypeOfCamera aCamera);
0055   
0056   Standard_EXPORT VrmlConverter_TypeOfCamera Camera() const;
0057   
0058   Standard_EXPORT void SetLight (const VrmlConverter_TypeOfLight aLight);
0059   
0060   Standard_EXPORT VrmlConverter_TypeOfLight Light() const;
0061   
0062 
0063   //! Adds  into anOStream  if  they  are  defined in  Create.
0064   //! PerspectiveCamera,
0065   //! OrthographicCamera,
0066   //! DirectionLight,
0067   //! PointLight,
0068   //! SpotLight
0069   //! with  MatrixTransform  from VrmlConverter;
0070   Standard_EXPORT void Add (Standard_OStream& anOStream) const;
0071   
0072   Standard_EXPORT HLRAlgo_Projector Projector() const;
0073 
0074   DEFINE_STANDARD_RTTIEXT(VrmlConverter_Projector,Standard_Transient)
0075 
0076 private:
0077 
0078 
0079   HLRAlgo_Projector myProjector;
0080   Vrml_PerspectiveCamera myPerspectiveCamera;
0081   Vrml_OrthographicCamera myOrthographicCamera;
0082   Vrml_DirectionalLight myDirectionalLight;
0083   Vrml_PointLight myPointLight;
0084   Vrml_SpotLight mySpotLight;
0085   VrmlConverter_TypeOfCamera myTypeOfCamera;
0086   VrmlConverter_TypeOfLight myTypeOfLight;
0087   Vrml_MatrixTransform myMatrixTransform;
0088 
0089 
0090 };
0091 
0092 #endif // _VrmlConverter_Projector_HeaderFile