Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-28 09:20:13

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 class VrmlConverter_Projector;
0037 DEFINE_STANDARD_HANDLE(VrmlConverter_Projector, Standard_Transient)
0038 
0039 //! defines projector  and calculates properties of cameras and lights from Vrml
0040 //! ( OrthograpicCamera, PerspectiveCamera, DirectionalLight, PointLight, SpotLight
0041 //! and  MatrixTransform  )  to display all scene  shapes  with  arbitrary locations
0042 //! for requested the Projection Vector,  High Point Direction and the Focus
0043 //! and adds them ( method Add ) to anOSream.
0044 class VrmlConverter_Projector : public Standard_Transient
0045 {
0046 
0047 public:
0048   Standard_EXPORT VrmlConverter_Projector(
0049     const TopTools_Array1OfShape&    Shapes,
0050     const Standard_Real              Focus,
0051     const Standard_Real              DX,
0052     const Standard_Real              DY,
0053     const Standard_Real              DZ,
0054     const Standard_Real              XUp,
0055     const Standard_Real              YUp,
0056     const Standard_Real              ZUp,
0057     const VrmlConverter_TypeOfCamera Camera = VrmlConverter_NoCamera,
0058     const VrmlConverter_TypeOfLight  Light  = VrmlConverter_NoLight);
0059 
0060   Standard_EXPORT void SetCamera(const VrmlConverter_TypeOfCamera aCamera);
0061 
0062   Standard_EXPORT VrmlConverter_TypeOfCamera Camera() const;
0063 
0064   Standard_EXPORT void SetLight(const VrmlConverter_TypeOfLight aLight);
0065 
0066   Standard_EXPORT VrmlConverter_TypeOfLight Light() const;
0067 
0068   //! Adds  into anOStream  if  they  are  defined in  Create.
0069   //! PerspectiveCamera,
0070   //! OrthographicCamera,
0071   //! DirectionLight,
0072   //! PointLight,
0073   //! SpotLight
0074   //! with  MatrixTransform  from VrmlConverter;
0075   Standard_EXPORT void Add(Standard_OStream& anOStream) const;
0076 
0077   Standard_EXPORT HLRAlgo_Projector Projector() const;
0078 
0079   DEFINE_STANDARD_RTTIEXT(VrmlConverter_Projector, Standard_Transient)
0080 
0081 private:
0082   HLRAlgo_Projector          myProjector;
0083   Vrml_PerspectiveCamera     myPerspectiveCamera;
0084   Vrml_OrthographicCamera    myOrthographicCamera;
0085   Vrml_DirectionalLight      myDirectionalLight;
0086   Vrml_PointLight            myPointLight;
0087   Vrml_SpotLight             mySpotLight;
0088   VrmlConverter_TypeOfCamera myTypeOfCamera;
0089   VrmlConverter_TypeOfLight  myTypeOfLight;
0090   Vrml_MatrixTransform       myMatrixTransform;
0091 };
0092 
0093 #endif // _VrmlConverter_Projector_HeaderFile