1 // Created on: 2003-12-17
2 // Created by: Alexander SOLOVYOV
3 // Copyright (c) 2003-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _MeshVS_Tool_HeaderFile
17 #define _MeshVS_Tool_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
23 #include <Standard_Boolean.hxx>
24 #include <TColStd_Array1OfReal.hxx>
25 class Graphic3d_AspectFillArea3d;
27 class Graphic3d_MaterialAspect;
28 class Graphic3d_AspectLine3d;
29 class Graphic3d_AspectMarker3d;
30 class Graphic3d_AspectText3d;
34 //! This class provides auxiliary methods to create different aspects
42 //! Creates fill area aspect with values from Drawer according to keys from DrawerAttribute
43 Standard_EXPORT static Handle(Graphic3d_AspectFillArea3d) CreateAspectFillArea3d (const Handle(MeshVS_Drawer)& theDr, const Standard_Boolean UseDefaults = Standard_True);
45 //! Creates fill aspect with values from Drawer according to keys from DrawerAttribute
46 //! and specific material aspect
47 Standard_EXPORT static Handle(Graphic3d_AspectFillArea3d) CreateAspectFillArea3d (const Handle(MeshVS_Drawer)& theDr, const Graphic3d_MaterialAspect& Mat, const Standard_Boolean UseDefaults = Standard_True);
49 //! Creates line aspect with values from Drawer according to keys from DrawerAttribute
50 Standard_EXPORT static Handle(Graphic3d_AspectLine3d) CreateAspectLine3d (const Handle(MeshVS_Drawer)& theDr, const Standard_Boolean UseDefaults = Standard_True);
52 //! Creates marker aspect with values from Drawer according to keys from DrawerAttribute
53 Standard_EXPORT static Handle(Graphic3d_AspectMarker3d) CreateAspectMarker3d (const Handle(MeshVS_Drawer)& theDr, const Standard_Boolean UseDefaults = Standard_True);
55 //! Creates text aspect with values from Drawer according to keys from DrawerAttribute
56 Standard_EXPORT static Handle(Graphic3d_AspectText3d) CreateAspectText3d (const Handle(MeshVS_Drawer)& theDr, const Standard_Boolean UseDefaults = Standard_True);
58 //! Get one of normals to polygon described by these points.
59 //! If the polygon isn't planar, function returns false
60 Standard_EXPORT static Standard_Boolean GetNormal (const TColStd_Array1OfReal& Nodes, gp_Vec& Norm);
62 //! Get an average of normals to non-planar polygon described by these points or compute
63 //! normal of planar polygon. If the polygon isn't planar, function returns false
64 Standard_EXPORT static Standard_Boolean GetAverageNormal (const TColStd_Array1OfReal& Nodes, gp_Vec& Norm);
89 #endif // _MeshVS_Tool_HeaderFile