0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / AIS / AIS_TrihedronOwner.cxx
CommitLineData
bc001a40 1// Created by: Ilya SEVRIKOV
2// Copyright (c) 2016 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#include <AIS_TrihedronOwner.hxx>
16
17IMPLEMENT_STANDARD_RTTIEXT (AIS_TrihedronOwner, SelectMgr_EntityOwner)
18
19// =======================================================================
20// function : AIS_TrihedronOwner
21// purpose :
22// =======================================================================
23AIS_TrihedronOwner::AIS_TrihedronOwner (const Handle(SelectMgr_SelectableObject)& theSelObject,
24 const Prs3d_DatumParts thePart,
25 const Standard_Integer thePriority)
26: SelectMgr_EntityOwner (theSelObject, thePriority),
27 myDatumPart (thePart)
28{
29}
30
31// =======================================================================
32// function : HilightWithColor
33// purpose :
34// =======================================================================
35void AIS_TrihedronOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
36 const Handle(Prs3d_Drawer)& theStyle,
37 const Standard_Integer /*theMode*/)
38{
39 Selectable()->HilightOwnerWithColor (thePM, theStyle, this);
40}
41
42// =======================================================================
43// function : IsHilighted
44// purpose :
45// =======================================================================
46Standard_Boolean AIS_TrihedronOwner::IsHilighted (const Handle(PrsMgr_PresentationManager)& thePM,
47 const Standard_Integer theMode) const
48{
49 if (!HasSelectable())
50 {
51 return Standard_False;
52 }
53
54 return thePM->IsHighlighted (Selectable(), theMode);
55}
56
57// =======================================================================
58// function : Unhilight
59// purpose :
60// =======================================================================
61void AIS_TrihedronOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& thePM,
62 const Standard_Integer theMode)
63{
64 (void )theMode;
65 if (!HasSelectable())
66 {
67 return;
68 }
69
70 thePM->Unhighlight (Selectable());
71}