0024428: Implementation of LGPL license
[occt.git] / src / AIS / AIS_InteractiveObject.lxx
1 // Created on: 1997-01-08
2 // Created by: Robert COUBLANC
3 // Copyright (c) 1997-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
9 // under the terms of the GNU Lesser General Public 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 //GER61351              //GG_171199     Enable to set an object RGB color instead a restricted object NameOfColor.
18
19
20 inline Standard_Boolean  AIS_InteractiveObject::AcceptShapeDecomposition() const 
21 {return Standard_False;}
22
23
24 inline Standard_Boolean AIS_InteractiveObject::IsInfinite() const 
25 {return myInfiniteState;}
26
27 inline Standard_Boolean AIS_InteractiveObject::HasColor() const 
28 {return hasOwnColor;}
29
30 inline const Handle(Standard_Transient)& 
31 AIS_InteractiveObject::GetOwner() const 
32 {return myOwner;}
33
34 inline void AIS_InteractiveObject::SetOwner(const Handle(Standard_Transient)& ApplicativeEntity)
35 {myOwner = ApplicativeEntity;}
36
37 inline const TColStd_ListOfTransient&  
38 AIS_InteractiveObject::Users() const 
39 {return myUsers;}
40
41 inline Standard_Boolean AIS_InteractiveObject::HasDisplayMode() const 
42 {return myDisplayMode!=-1;}
43
44 inline void AIS_InteractiveObject::UnsetDisplayMode()
45 {myDisplayMode =-1;}
46
47 inline Standard_Integer AIS_InteractiveObject::DisplayMode() const 
48 {return myDisplayMode;}
49
50 inline Standard_Boolean AIS_InteractiveObject::HasSelectionMode() const 
51 {return mySelectionMode!=-1;}
52
53 inline void AIS_InteractiveObject::UnsetSelectionMode()
54 {mySelectionMode =-1;}
55
56 inline Standard_Integer AIS_InteractiveObject::SelectionMode() const 
57 {return mySelectionMode;}
58
59
60
61 inline Quantity_NameOfColor AIS_InteractiveObject::Color() const 
62 {
63   return myOwnColor.Name();
64 }
65
66 inline void AIS_InteractiveObject::Color(Quantity_Color& aColor) const 
67 {
68   aColor = myOwnColor;
69 }
70
71 inline Standard_Boolean AIS_InteractiveObject::HasWidth() const 
72 {return !(myOwnWidth == 0.);}
73
74 inline Standard_Real AIS_InteractiveObject::Width() const 
75 {return myOwnWidth;}
76 inline Standard_Boolean AIS_InteractiveObject::HasMaterial() const 
77 {return hasOwnMaterial;}
78
79 //POP pour K4L
80 inline Graphic3d_NameOfMaterial AIS_InteractiveObject::Material() const 
81 //inline Graphic3d_NameOfPhysicalMaterial AIS_InteractiveObject::Material() const 
82 {return myOwnMaterial;}
83
84 inline const Handle(AIS_Drawer)& 
85 AIS_InteractiveObject::Attributes() const 
86 {return myDrawer;}
87
88 inline Standard_Boolean AIS_InteractiveObject::HasHilightMode() const  
89 {return myHilightMode!=-1;}
90
91 inline Standard_Integer AIS_InteractiveObject::HilightMode() const
92 {return myHilightMode;}
93
94 inline void AIS_InteractiveObject::SetHilightMode(const Standard_Integer aMode)
95 {myHilightMode = aMode;}
96
97 inline void AIS_InteractiveObject::UnsetHilightMode()
98 {myHilightMode = -1;}
99
100
101 inline Standard_Boolean AIS_InteractiveObject::IsTransparent() const 
102 {return myTransparency >0.005;}
103
104 inline Standard_Boolean AIS_InteractiveObject::HasSelectionPriority() const 
105 {return mySelPriority != -1;}
106 inline void AIS_InteractiveObject::SetSelectionPriority(const Standard_Integer P)
107 {mySelPriority = P;}
108 inline void AIS_InteractiveObject::UnsetSelectionPriority()
109 {mySelPriority = -1;}
110 inline Standard_Integer AIS_InteractiveObject::SelectionPriority() const 
111 {return mySelPriority;}
112
113 inline Standard_Integer AIS_InteractiveObject::State() const
114 {return mystate;}
115
116 inline void AIS_InteractiveObject::State(const Standard_Integer TheState)
117 {mystate = TheState;}
118