0031458: Visualization - refine classes across Prs3d and StdPrs packages
[occt.git] / src / TopLoc / TopLoc_Datum3D.hxx
CommitLineData
42cf5bc1 1// Created on: 1991-01-23
2// Created by: Christophe MARION
3// Copyright (c) 1991-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _TopLoc_Datum3D_HeaderFile
18#define _TopLoc_Datum3D_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <gp_Trsf.hxx>
25e59720 24#include <Standard_Transient.hxx>
42cf5bc1 25#include <Standard_OStream.hxx>
42cf5bc1 26
27class TopLoc_Datum3D;
25e59720 28DEFINE_STANDARD_HANDLE(TopLoc_Datum3D, Standard_Transient)
42cf5bc1 29
30//! Describes a coordinate transformation, i.e. a change
31//! to an elementary 3D coordinate system, or position in 3D space.
32//! A Datum3D is always described relative to the default datum.
33//! The default datum is described relative to itself: its
34//! origin is (0,0,0), and its axes are (1,0,0) (0,1,0) (0,0,1).
25e59720 35class TopLoc_Datum3D : public Standard_Transient
42cf5bc1 36{
37
38public:
39
42cf5bc1 40 //! Constructs a default Datum3D.
41 Standard_EXPORT TopLoc_Datum3D();
42
43 //! Constructs a Datum3D form a Trsf from gp. An error is
44 //! raised if the Trsf is not a rigid transformation.
45 Standard_EXPORT TopLoc_Datum3D(const gp_Trsf& T);
46
7f24b768 47 //! Returns a gp_Trsf which, when applied to this datum, produces the default datum.
48 const gp_Trsf& Transformation() const { return myTrsf; }
49
50 //! Returns a gp_Trsf which, when applied to this datum, produces the default datum.
51 const gp_Trsf& Trsf() const { return myTrsf; }
52
53 //! Return transformation form.
54 gp_TrsfForm Form() const { return myTrsf.Form(); }
42cf5bc1 55
0904aa63 56 //! Dumps the content of me into the stream
bc73b006 57 Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0904aa63 58
42cf5bc1 59 //! Writes the contents of this Datum3D to the stream S.
60 Standard_EXPORT void ShallowDump (Standard_OStream& S) const;
61
25e59720 62 DEFINE_STANDARD_RTTIEXT(TopLoc_Datum3D,Standard_Transient)
42cf5bc1 63
42cf5bc1 64private:
65
42cf5bc1 66 gp_Trsf myTrsf;
67
42cf5bc1 68};
69
42cf5bc1 70inline void ShallowDump(const Handle(TopLoc_Datum3D)& me,Standard_OStream& S) {
71 me->ShallowDump(S);
72}
73
42cf5bc1 74#endif // _TopLoc_Datum3D_HeaderFile