0027958: Visualization, AIS_Trihedron - add shaded presentation option
[occt.git] / src / Prs3d / Prs3d_Arrow.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _Prs3d_Arrow_HeaderFile
18#define _Prs3d_Arrow_HeaderFile
19
42cf5bc1 20#include <Prs3d_Root.hxx>
62ef08df 21
22#include <Graphic3d_ArrayOfTriangles.hxx>
bc001a40 23#include <Graphic3d_ArrayOfSegments.hxx>
42cf5bc1 24#include <Quantity_PlaneAngle.hxx>
25#include <Quantity_Length.hxx>
4ad142d9 26
62ef08df 27class gp_Ax1;
42cf5bc1 28class gp_Pnt;
29class gp_Dir;
30
4ad142d9 31//! Provides class methods to draw an arrow at a given location, along a given direction and using a given angle.
32class Prs3d_Arrow : public Prs3d_Root
42cf5bc1 33{
34public:
35
62ef08df 36 //! Defines the representation of the arrow as shaded triangulation.
37 //! @param theAxis axis definition (arrow origin and direction)
38 //! @param theTubeRadius tube (cylinder) radius
39 //! @param theAxisLength overall arrow length (cylinder + cone)
40 //! @param theConeRadius cone radius (arrow tip)
41 //! @param theConeLength cone length (arrow tip)
42 //! @param theNbFacettes tessellation quality for each part
43 Standard_EXPORT static Handle(Graphic3d_ArrayOfTriangles) DrawShaded (const gp_Ax1& theAxis,
44 const Standard_Real theTubeRadius,
45 const Standard_Real theAxisLength,
46 const Standard_Real theConeRadius,
47 const Standard_Real theConeLength,
48 const Standard_Integer theNbFacettes);
42cf5bc1 49
bc001a40 50 //! Defines the representation of the arrow as a container of segments.
51 //! @param theLocation location of the arrow tip
52 //! @param theDir direction of the arrow
53 //! @param theAngle angle of opening of the arrow head
54 //! @param theLength length of the arrow (from the tip)
55 //! @param theNbSegments count of points on polyline where location is connected
56 Standard_EXPORT static Handle(Graphic3d_ArrayOfSegments) DrawSegments (const gp_Pnt& theLocation,
57 const gp_Dir& theDir,
58 const Quantity_PlaneAngle theAngle,
59 const Quantity_Length theLength,
60 const Standard_Integer theNbSegments);
61
4ad142d9 62 //! Defines the representation of the arrow.
63 //! Note that this method does NOT assign any presentation aspects to the primitives group!
64 //! @param theGroup presentation group to add primitives
65 //! @param theLocation location of the arrow tip
66 //! @param theDirection direction of the arrow
67 //! @param theAngle angle of opening of the arrow head
68 //! @param theLength length of the arrow (from the tip)
69 Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup,
70 const gp_Pnt& theLocation,
71 const gp_Dir& theDirection,
72 const Quantity_PlaneAngle theAngle,
73 const Quantity_Length theLength);
74
75 //! Alias to another method Draw() for backward compatibility.
76 Standard_DEPRECATED("Prs3d_Arrow::Draw() taking Graphic3d_Group should be used instead")
77 static void Draw (const Handle(Prs3d_Presentation)& thePrs,
78 const gp_Pnt& theLocation,
79 const gp_Dir& theDirection,
80 const Quantity_PlaneAngle theAngle,
81 const Quantity_Length theLength)
82 {
83 Draw (Prs3d_Root::CurrentGroup (thePrs), theLocation, theDirection, theAngle, theLength);
84 }
42cf5bc1 85
86};
87
42cf5bc1 88#endif // _Prs3d_Arrow_HeaderFile