0023024: Update headers of OCCT files
[occt.git] / src / Aspect / Aspect_AspectMarker.cxx
1 // Created by: NW,JPB,CAL
2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2012 OPEN CASCADE SAS
4 //
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
9 //
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 //
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
19
20
21
22
23 //-Version      
24
25 //-Design       Declaration of variables specific to the context
26 //              of tracing of markers
27
28 //-Warning      Context of tracing of markers is defined by :
29 //              - the color
30 //              - the type
31 //              - the scale
32
33 //-References   
34
35 //-Language     C++ 2.0
36
37 //-Declarations
38
39 // for the class
40 #include <Aspect_AspectMarker.ixx>
41
42 //-Aliases
43
44 //-Global data definitions
45
46 //      -- color
47 //      MyColor :       Color;
48
49 //      -- type
50 //      MyType  :       TypeOfMarker;
51
52 //      -- scale
53 //      MyScale :       Standard_Real;
54
55 //-Constructors
56
57 //-Destructors
58
59 //-Methods, in order
60
61 Aspect_AspectMarker::Aspect_AspectMarker () {
62
63         MyColor = Quantity_NOC_YELLOW;
64         MyType  = Aspect_TOM_X;
65         MyScale = 1.0;
66
67 }
68
69 Aspect_AspectMarker::Aspect_AspectMarker (const Quantity_Color& AColor, const Aspect_TypeOfMarker AType, const Standard_Real AScale) {
70
71         if (AScale <= 0.0)
72                 Aspect_AspectMarkerDefinitionError::Raise
73                         ("Bad value for MarkerScale");
74
75         MyColor = AColor;
76         MyType  = AType;
77         MyScale = AScale;
78
79 }
80
81 void Aspect_AspectMarker::SetColor (const Quantity_Color& AColor) {
82
83         MyColor = AColor;
84
85 }
86
87 void Aspect_AspectMarker::SetType (const Aspect_TypeOfMarker AType) {
88
89         MyType  = AType;
90
91 }
92
93 void Aspect_AspectMarker::SetScale (const Standard_Real AScale) {
94
95         if (AScale <= 0.0)
96                 Aspect_AspectMarkerDefinitionError::Raise
97                         ("Bad value for MarkerScale");
98
99         MyScale = AScale;
100
101 }
102
103 void Aspect_AspectMarker::Values (Quantity_Color& AColor, Aspect_TypeOfMarker& AType, Standard_Real& AScale) const {
104
105         AColor  = MyColor;
106         AType   = MyType;
107         AScale  = MyScale;
108
109 }