Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:16

0001 // Created on: 2003-12-17
0002 // Created by: Alexander SOLOVYOV
0003 // Copyright (c) 2003-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _MeshVS_Tool_HeaderFile
0017 #define _MeshVS_Tool_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022 
0023 #include <TColStd_Array1OfReal.hxx>
0024 class Graphic3d_AspectFillArea3d;
0025 class MeshVS_Drawer;
0026 class Graphic3d_MaterialAspect;
0027 class Graphic3d_AspectLine3d;
0028 class Graphic3d_AspectMarker3d;
0029 class Graphic3d_AspectText3d;
0030 class gp_Vec;
0031 
0032 
0033 //! This class provides auxiliary methods to create different aspects
0034 class MeshVS_Tool 
0035 {
0036 public:
0037 
0038   DEFINE_STANDARD_ALLOC
0039 
0040   
0041   //! Creates fill area aspect with values from Drawer according to keys from DrawerAttribute
0042   Standard_EXPORT static Handle(Graphic3d_AspectFillArea3d) CreateAspectFillArea3d (const Handle(MeshVS_Drawer)& theDr, const Standard_Boolean UseDefaults = Standard_True);
0043   
0044   //! Creates fill aspect with values from Drawer according to keys from DrawerAttribute
0045   //! and specific material aspect
0046   Standard_EXPORT static Handle(Graphic3d_AspectFillArea3d) CreateAspectFillArea3d (const Handle(MeshVS_Drawer)& theDr, const Graphic3d_MaterialAspect& Mat, const Standard_Boolean UseDefaults = Standard_True);
0047   
0048   //! Creates line aspect with values from Drawer according to keys from DrawerAttribute
0049   Standard_EXPORT static Handle(Graphic3d_AspectLine3d) CreateAspectLine3d (const Handle(MeshVS_Drawer)& theDr, const Standard_Boolean UseDefaults = Standard_True);
0050   
0051   //! Creates marker aspect with values from Drawer according to keys from DrawerAttribute
0052   Standard_EXPORT static Handle(Graphic3d_AspectMarker3d) CreateAspectMarker3d (const Handle(MeshVS_Drawer)& theDr, const Standard_Boolean UseDefaults = Standard_True);
0053   
0054   //! Creates text aspect with values from Drawer according to keys from DrawerAttribute
0055   Standard_EXPORT static Handle(Graphic3d_AspectText3d) CreateAspectText3d (const Handle(MeshVS_Drawer)& theDr, const Standard_Boolean UseDefaults = Standard_True);
0056   
0057   //! Get one of normals to polygon described by these points.
0058   //! If the polygon isn't planar, function returns false
0059   Standard_EXPORT static Standard_Boolean GetNormal (const TColStd_Array1OfReal& Nodes, gp_Vec& Norm);
0060   
0061   //! Get an average of normals to non-planar polygon described by these points or compute
0062   //! normal of planar polygon. If the polygon isn't planar, function returns false
0063   Standard_EXPORT static Standard_Boolean GetAverageNormal (const TColStd_Array1OfReal& Nodes, gp_Vec& Norm);
0064 
0065 
0066 
0067 
0068 protected:
0069 
0070 
0071 
0072 
0073 
0074 private:
0075 
0076 
0077 
0078 
0079 
0080 };
0081 
0082 
0083 
0084 
0085 
0086 
0087 
0088 #endif // _MeshVS_Tool_HeaderFile