1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
19 #include <gp_Trsf.hxx>
20 #include <HLRAlgo_Projector.hxx>
21 #include <Prs3d_Projector.hxx>
22 #include <Standard_Type.hxx>
24 IMPLEMENT_STANDARD_RTTIEXT(Prs3d_Projector,MMgt_TShared)
26 Prs3d_Projector::Prs3d_Projector (const HLRAlgo_Projector& HLPr): MyProjector(HLPr)
31 Prs3d_Projector::Prs3d_Projector (const Standard_Boolean Pers,
32 const Quantity_Length Focus,
33 const Quantity_Length DX,
34 const Quantity_Length DY,
35 const Quantity_Length DZ,
36 const Quantity_Length XAt,
37 const Quantity_Length YAt,
38 const Quantity_Length ZAt,
39 const Quantity_Length XUp,
40 const Quantity_Length YUp,
41 const Quantity_Length ZUp)
43 gp_Pnt At (XAt,YAt,ZAt);
44 gp_Dir Zpers (DX,DY,DZ);
45 gp_Dir Ypers (XUp,YUp,ZUp);
46 gp_Dir Xpers = Ypers.Crossed(Zpers);
47 gp_Ax3 Axe (At, Zpers, Xpers);
49 T.SetTransformation(Axe);
50 MyProjector = HLRAlgo_Projector(T,Pers,Focus);
54 HLRAlgo_Projector Prs3d_Projector::Projector () const