Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-11 09:19:32

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 //! Describes a coordinate transformation, i.e. a change
0028 //! to an elementary 3D coordinate system, or position in 3D space.
0029 //! A Datum3D is always described relative to the default datum.
0030 //! The default datum is described relative to itself: its
0031 //! origin is (0,0,0), and its axes are (1,0,0) (0,1,0) (0,0,1).
0032 class TopLoc_Datum3D : public Standard_Transient
0033 {
0034 
0035 public:
0036   //! Constructs a default Datum3D.
0037   Standard_EXPORT TopLoc_Datum3D();
0038 
0039   //! Constructs a Datum3D form a Trsf from gp. An error is
0040   //! raised if the Trsf is not a rigid transformation.
0041   Standard_EXPORT TopLoc_Datum3D(const gp_Trsf& T);
0042 
0043   //! Returns a gp_Trsf which, when applied to this datum, produces the default datum.
0044   const gp_Trsf& Transformation() const { return myTrsf; }
0045 
0046   //! Returns a gp_Trsf which, when applied to this datum, produces the default datum.
0047   const gp_Trsf& Trsf() const { return myTrsf; }
0048 
0049   //! Return transformation form.
0050   gp_TrsfForm Form() const { return myTrsf.Form(); }
0051 
0052   //! Dumps the content of me into the stream
0053   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const;
0054 
0055   //! Writes the contents of this Datum3D to the stream S.
0056   Standard_EXPORT void ShallowDump(Standard_OStream& S) const;
0057 
0058   DEFINE_STANDARD_RTTIEXT(TopLoc_Datum3D, Standard_Transient)
0059 
0060 private:
0061   gp_Trsf myTrsf;
0062 };
0063 
0064 inline void ShallowDump(const occ::handle<TopLoc_Datum3D>& me, Standard_OStream& S)
0065 {
0066   me->ShallowDump(S);
0067 }
0068 
0069 #endif // _TopLoc_Datum3D_HeaderFile