|
||||
File indexing completed on 2025-01-18 10:04:39
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 given angle. 0029 class Prs3d_Arrow 0030 { 0031 public: 0032 DEFINE_STANDARD_ALLOC 0033 0034 //! Defines the representation of the arrow as shaded triangulation. 0035 //! @param theAxis axis definition (arrow origin and direction) 0036 //! @param theTubeRadius tube (cylinder) radius 0037 //! @param theAxisLength overall arrow length (cylinder + cone) 0038 //! @param theConeRadius cone radius (arrow tip) 0039 //! @param theConeLength cone length (arrow tip) 0040 //! @param theNbFacettes tessellation quality for each part 0041 Standard_EXPORT static Handle(Graphic3d_ArrayOfTriangles) DrawShaded (const gp_Ax1& theAxis, 0042 const Standard_Real theTubeRadius, 0043 const Standard_Real theAxisLength, 0044 const Standard_Real theConeRadius, 0045 const Standard_Real theConeLength, 0046 const Standard_Integer theNbFacettes); 0047 0048 //! Defines the representation of the arrow as a container of segments. 0049 //! @param theLocation location of the arrow tip 0050 //! @param theDir direction of the arrow 0051 //! @param theAngle angle of opening of the arrow head 0052 //! @param theLength length of the arrow (from the tip) 0053 //! @param theNbSegments count of points on polyline where location is connected 0054 Standard_EXPORT static Handle(Graphic3d_ArrayOfSegments) DrawSegments (const gp_Pnt& theLocation, 0055 const gp_Dir& theDir, 0056 const Standard_Real theAngle, 0057 const Standard_Real theLength, 0058 const Standard_Integer theNbSegments); 0059 0060 //! Defines the representation of the arrow. 0061 //! Note that this method does NOT assign any presentation aspects to the primitives group! 0062 //! @param theGroup presentation group to add primitives 0063 //! @param theLocation location of the arrow tip 0064 //! @param theDirection direction of the arrow 0065 //! @param theAngle angle of opening of the arrow head 0066 //! @param theLength length of the arrow (from the tip) 0067 Standard_EXPORT static void Draw (const Handle(Graphic3d_Group)& theGroup, 0068 const gp_Pnt& theLocation, 0069 const gp_Dir& theDirection, 0070 const Standard_Real theAngle, 0071 const Standard_Real theLength); 0072 0073 }; 0074 0075 #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 |