1 // Created on: 2014-10-14
2 // Created by: Anton POLETAEV
3 // Copyright (c) 2013-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <Prs3d_BndBox.hxx>
18 #include <Prs3d_LineAspect.hxx>
20 //=======================================================================
23 //=======================================================================
24 void Prs3d_BndBox::Add (const Handle(Prs3d_Presentation)& thePresentation,
25 const Bnd_Box& theBndBox,
26 const Handle(Prs3d_Drawer)& theDrawer)
28 if (!theBndBox.IsVoid())
30 Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
31 aGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (theDrawer->LineAspect()->Aspect()->Color(),
33 theDrawer->LineAspect()->Aspect()->Width()));
34 aGroup->AddPrimitiveArray (FillSegments (theBndBox));
38 //=======================================================================
41 //=======================================================================
42 void Prs3d_BndBox::Add (const Handle(Prs3d_Presentation)& thePresentation,
43 const Bnd_OBB& theBndBox,
44 const Handle(Prs3d_Drawer)& theDrawer)
46 if (!theBndBox.IsVoid())
48 Handle(Graphic3d_Group) aGroup = thePresentation->CurrentGroup();
49 aGroup->SetGroupPrimitivesAspect (new Graphic3d_AspectLine3d (theDrawer->LineAspect()->Aspect()->Color(),
51 theDrawer->LineAspect()->Aspect()->Width()));
52 aGroup->AddPrimitiveArray (FillSegments (theBndBox));