0027958: Visualization, AIS_Trihedron - add shaded presentation option
[occt.git] / src / Prs3d / Prs3d_DimensionUnits.hxx
1 // Created on: 2013-11-11
2 // Created by: Anastasia BORISOVA
3 // Copyright (c) 2013-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef _Prs3d_DimensionUnits_Header
17 #define _Prs3d_DimensionUnits_Header
18
19 #include <TCollection_AsciiString.hxx>
20
21 //! This class provides units for two dimension groups:
22 //! - lengthes (length, radius, diameter)
23 //! - angles
24 class Prs3d_DimensionUnits
25 {
26 public:
27
28   //! Default constructor. Sets meters as default length units
29   //! and radians as default angle units.
30   Prs3d_DimensionUnits() 
31     : myLengthUnits ("m"),
32       myAngleUnits ("rad") 
33   {}
34
35   Prs3d_DimensionUnits (const Prs3d_DimensionUnits& theUnits)
36     : myLengthUnits (theUnits.GetLengthUnits()),
37       myAngleUnits (theUnits.GetAngleUnits())
38   {}
39
40   //! Sets angle units
41   void SetAngleUnits (const TCollection_AsciiString& theUnits) { myAngleUnits = theUnits; }
42
43   //! @return angle units
44   const TCollection_AsciiString& GetAngleUnits() const { return myAngleUnits; }
45
46   //! Sets length units
47   void SetLengthUnits (const TCollection_AsciiString& theUnits) { myLengthUnits = theUnits; }
48
49   //! @return length units
50   const TCollection_AsciiString& GetLengthUnits() const { return myLengthUnits; }
51
52 private:
53
54   TCollection_AsciiString myLengthUnits;
55   TCollection_AsciiString myAngleUnits;
56
57 };
58
59 #endif