0024153: Adding OpenCL to OCCT prerequisites
[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-2012 OPEN CASCADE SAS
5 //
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
10 //
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 //
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
20
21
22 //GER61351              //GG_171199     Enable to set an object RGB color instead a restricted object NameOfColor.
23
24
25 inline Standard_Boolean  AIS_InteractiveObject::AcceptShapeDecomposition() const 
26 {return Standard_False;}
27
28
29 inline Standard_Boolean AIS_InteractiveObject::IsInfinite() const 
30 {return myInfiniteState;}
31
32 inline Standard_Boolean AIS_InteractiveObject::HasColor() const 
33 {return hasOwnColor;}
34
35 inline const Handle(Standard_Transient)& 
36 AIS_InteractiveObject::GetOwner() const 
37 {return myOwner;}
38
39 inline void AIS_InteractiveObject::SetOwner(const Handle(Standard_Transient)& ApplicativeEntity)
40 {myOwner = ApplicativeEntity;}
41
42 inline const TColStd_ListOfTransient&  
43 AIS_InteractiveObject::Users() const 
44 {return myUsers;}
45
46 inline Standard_Boolean AIS_InteractiveObject::HasDisplayMode() const 
47 {return myDisplayMode!=-1;}
48
49 inline void AIS_InteractiveObject::UnsetDisplayMode()
50 {myDisplayMode =-1;}
51
52 inline Standard_Integer AIS_InteractiveObject::DisplayMode() const 
53 {return myDisplayMode;}
54
55 inline Standard_Boolean AIS_InteractiveObject::HasSelectionMode() const 
56 {return mySelectionMode!=-1;}
57
58 inline void AIS_InteractiveObject::UnsetSelectionMode()
59 {mySelectionMode =-1;}
60
61 inline Standard_Integer AIS_InteractiveObject::SelectionMode() const 
62 {return mySelectionMode;}
63
64
65
66 inline Quantity_NameOfColor AIS_InteractiveObject::Color() const 
67 {
68   return myOwnColor.Name();
69 }
70
71 inline void AIS_InteractiveObject::Color(Quantity_Color& aColor) const 
72 {
73   aColor = myOwnColor;
74 }
75
76 inline Standard_Boolean AIS_InteractiveObject::HasWidth() const 
77 {return !(myOwnWidth == 0.);}
78
79 inline Standard_Real AIS_InteractiveObject::Width() const 
80 {return myOwnWidth;}
81 inline Standard_Boolean AIS_InteractiveObject::HasMaterial() const 
82 {return hasOwnMaterial;}
83
84 //POP pour K4L
85 inline Graphic3d_NameOfMaterial AIS_InteractiveObject::Material() const 
86 //inline Graphic3d_NameOfPhysicalMaterial AIS_InteractiveObject::Material() const 
87 {return myOwnMaterial;}
88
89 inline const Handle(AIS_Drawer)& 
90 AIS_InteractiveObject::Attributes() const 
91 {return myDrawer;}
92
93 inline Standard_Boolean AIS_InteractiveObject::HasHilightMode() const  
94 {return myHilightMode!=-1;}
95
96 inline Standard_Integer AIS_InteractiveObject::HilightMode() const
97 {return myHilightMode;}
98
99 inline void AIS_InteractiveObject::SetHilightMode(const Standard_Integer aMode)
100 {myHilightMode = aMode;}
101
102 inline void AIS_InteractiveObject::UnsetHilightMode()
103 {myHilightMode = -1;}
104
105
106 inline Standard_Boolean AIS_InteractiveObject::IsTransparent() const 
107 {return myTransparency >0.005;}
108
109 inline Standard_Boolean AIS_InteractiveObject::HasSelectionPriority() const 
110 {return mySelPriority != -1;}
111 inline void AIS_InteractiveObject::SetSelectionPriority(const Standard_Integer P)
112 {mySelPriority = P;}
113 inline void AIS_InteractiveObject::UnsetSelectionPriority()
114 {mySelPriority = -1;}
115 inline Standard_Integer AIS_InteractiveObject::SelectionPriority() const 
116 {return mySelPriority;}
117
118 inline Standard_Integer AIS_InteractiveObject::State() const
119 {return mystate;}
120
121 inline void AIS_InteractiveObject::State(const Standard_Integer TheState)
122 {mystate = TheState;}
123