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