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