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