1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #include <Prs3d_ArrowAspect.ixx>
17 Prs3d_ArrowAspect::Prs3d_ArrowAspect ()
18 : myAngle(M_PI/180.*10), myLength(1.) {
20 new Graphic3d_AspectLine3d (
21 Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0);
25 Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Quantity_PlaneAngle anAngle,
26 const Quantity_Length aLength)
27 : myAngle(anAngle), myLength(aLength) {
29 new Graphic3d_AspectLine3d (
30 Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0);
33 void Prs3d_ArrowAspect::SetAngle ( const Quantity_PlaneAngle anAngle) {
34 Prs3d_InvalidAngle_Raise_if ( anAngle <= 0. ||
35 anAngle >= M_PI /2. , "");
38 Quantity_PlaneAngle Prs3d_ArrowAspect::Angle () const
43 void Prs3d_ArrowAspect::SetLength ( const Quantity_Length aLength)
47 Quantity_Length Prs3d_ArrowAspect::Length () const
52 void Prs3d_ArrowAspect::SetColor(const Quantity_Color &aColor) {
53 myArrowAspect->SetColor(aColor);
56 void Prs3d_ArrowAspect::SetColor(const Quantity_NameOfColor aColor) {
57 SetColor(Quantity_Color(aColor));
60 Handle(Graphic3d_AspectLine3d) Prs3d_ArrowAspect::Aspect() const {