|
|
|||
File indexing completed on 2026-09-09 09:16:40
0001 // Created on: 1993-04-15 0002 // Created by: Jean-Louis Frenkel 0003 // Copyright (c) 1993-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _Prs3d_Arrow_HeaderFile 0018 #define _Prs3d_Arrow_HeaderFile 0019 0020 #include <Graphic3d_ArrayOfTriangles.hxx> 0021 #include <Graphic3d_ArrayOfSegments.hxx> 0022 #include <Prs3d_Presentation.hxx> 0023 0024 class gp_Ax1; 0025 class gp_Pnt; 0026 class gp_Dir; 0027 0028 //! Provides class methods to draw an arrow at a given location, along a given direction and using a 0029 //! given angle. 0030 class Prs3d_Arrow 0031 { 0032 public: 0033 DEFINE_STANDARD_ALLOC 0034 0035 //! Defines the representation of the arrow as shaded triangulation. 0036 //! @param theAxis axis definition (arrow origin and direction) 0037 //! @param theTubeRadius tube (cylinder) radius 0038 //! @param theAxisLength overall arrow length (cylinder + cone) 0039 //! @param theConeRadius cone radius (arrow tip) 0040 //! @param theConeLength cone length (arrow tip) 0041 //! @param theNbFacettes tessellation quality for each part 0042 Standard_EXPORT static Handle(Graphic3d_ArrayOfTriangles) DrawShaded( 0043 const gp_Ax1& theAxis, 0044 const Standard_Real theTubeRadius, 0045 const Standard_Real theAxisLength, 0046 const Standard_Real theConeRadius, 0047 const Standard_Real theConeLength, 0048 const Standard_Integer theNbFacettes); 0049 0050 //! Defines the representation of the arrow as a container of segments. 0051 //! @param theLocation location of the arrow tip 0052 //! @param theDir direction of the arrow 0053 //! @param theAngle angle of opening of the arrow head 0054 //! @param theLength length of the arrow (from the tip) 0055 //! @param theNbSegments count of points on polyline where location is connected 0056 Standard_EXPORT static Handle(Graphic3d_ArrayOfSegments) DrawSegments( 0057 const gp_Pnt& theLocation, 0058 const gp_Dir& theDir, 0059 const Standard_Real theAngle, 0060 const Standard_Real theLength, 0061 const Standard_Integer theNbSegments); 0062 0063 //! Defines the representation of the arrow. 0064 //! Note that this method does NOT assign any presentation aspects to the primitives group! 0065 //! @param theGroup presentation group to add primitives 0066 //! @param theLocation location of the arrow tip 0067 //! @param theDirection direction of the arrow 0068 //! @param theAngle angle of opening of the arrow head 0069 //! @param theLength length of the arrow (from the tip) 0070 Standard_EXPORT static void Draw(const Handle(Graphic3d_Group)& theGroup, 0071 const gp_Pnt& theLocation, 0072 const gp_Dir& theDirection, 0073 const Standard_Real theAngle, 0074 const Standard_Real theLength); 0075 }; 0076 0077 #endif // _Prs3d_Arrow_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|