Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1991-01-23
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1991-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 _TopLoc_Datum3D_HeaderFile
0018 #define _TopLoc_Datum3D_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_Trsf.hxx>
0024 #include <Standard_Transient.hxx>
0025 #include <Standard_OStream.hxx>
0026 
0027 class TopLoc_Datum3D;
0028 DEFINE_STANDARD_HANDLE(TopLoc_Datum3D, Standard_Transient)
0029 
0030 //! Describes a coordinate transformation, i.e. a change
0031 //! to an elementary 3D coordinate system, or position in 3D space.
0032 //! A Datum3D is always described relative to the default datum.
0033 //! The default datum is described relative to itself: its
0034 //! origin is (0,0,0), and its axes are (1,0,0) (0,1,0) (0,0,1).
0035 class TopLoc_Datum3D : public Standard_Transient
0036 {
0037 
0038 public:
0039 
0040   //! Constructs a default Datum3D.
0041   Standard_EXPORT TopLoc_Datum3D();
0042   
0043   //! Constructs a Datum3D form a Trsf from gp. An error is
0044   //! raised if the Trsf is not a rigid transformation.
0045   Standard_EXPORT TopLoc_Datum3D(const gp_Trsf& T);
0046   
0047   //! Returns a gp_Trsf which, when applied to this datum, produces the default datum.
0048   const gp_Trsf& Transformation() const { return myTrsf; }
0049 
0050   //! Returns a gp_Trsf which, when applied to this datum, produces the default datum.
0051   const gp_Trsf& Trsf() const { return myTrsf; }
0052 
0053   //! Return transformation form.
0054   gp_TrsfForm Form() const { return myTrsf.Form(); }
0055 
0056   //! Dumps the content of me into the stream
0057   Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0058 
0059   //! Writes the contents of this Datum3D to the stream S.
0060   Standard_EXPORT void ShallowDump (Standard_OStream& S) const;
0061 
0062   DEFINE_STANDARD_RTTIEXT(TopLoc_Datum3D,Standard_Transient)
0063 
0064 private:
0065 
0066   gp_Trsf myTrsf;
0067 
0068 };
0069 
0070 inline void ShallowDump(const Handle(TopLoc_Datum3D)& me,Standard_OStream& S) {
0071  me->ShallowDump(S);
0072 }
0073 
0074 #endif // _TopLoc_Datum3D_HeaderFile