1 // Created on: 1993-04-15
2 // Created by: Jean-Louis Frenkel
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Prs3d_Arrow_HeaderFile
18 #define _Prs3d_Arrow_HeaderFile
20 #include <Graphic3d_ArrayOfTriangles.hxx>
21 #include <Graphic3d_ArrayOfSegments.hxx>
22 #include <Prs3d_Presentation.hxx>
28 //! Provides class methods to draw an arrow at a given location, along a given direction and using a given angle.
34 //! Defines the representation of the arrow as shaded triangulation.
35 //! @param theAxis axis definition (arrow origin and direction)
36 //! @param theTubeRadius tube (cylinder) radius
37 //! @param theAxisLength overall arrow length (cylinder + cone)
38 //! @param theConeRadius cone radius (arrow tip)
39 //! @param theConeLength cone length (arrow tip)
40 //! @param theNbFacettes tessellation quality for each part
41 Standard_EXPORT static Handle(Graphic3d_ArrayOfTriangles) DrawShaded (const gp_Ax1& theAxis,
42 const Standard_Real theTubeRadius,
43 const Standard_Real theAxisLength,
44 const Standard_Real theConeRadius,
45 const Standard_Real theConeLength,
46 const Standard_Integer theNbFacettes);
48 //! Defines the representation of the arrow as a container of segments.
49 //! @param theLocation location of the arrow tip
50 //! @param theDir direction of the arrow
51 //! @param theAngle angle of opening of the arrow head
52 //! @param theLength length of the arrow (from the tip)
53 //! @param theNbSegments count of points on polyline where location is connected
54 Standard_EXPORT static Handle(Graphic3d_ArrayOfSegments) DrawSegments (const gp_Pnt& theLocation,
56 const Standard_Real theAngle,
57 const Standard_Real theLength,
58 const Standard_Integer theNbSegments);
60 //! Defines the representation of the arrow.
61 //! Note that this method does NOT assign any presentation aspects to the primitives group!
62 //! @param theGroup presentation group to add primitives
63 //! @param theLocation location of the arrow tip
64 //! @param theDirection direction of the arrow
65 //! @param theAngle angle of opening of the arrow head
66 //! @param theLength length of the arrow (from the tip)
67 Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup,
68 const gp_Pnt& theLocation,
69 const gp_Dir& theDirection,
70 const Standard_Real theAngle,
71 const Standard_Real theLength);
75 #endif // _Prs3d_Arrow_HeaderFile