0031322: Visualization, Select3D_SensitiveEntity - method NbSubElements() should...
[occt.git] / src / MeshVS / MeshVS_Tool.hxx
CommitLineData
42cf5bc1 1// Created on: 2003-12-17
2// Created by: Alexander SOLOVYOV
3// Copyright (c) 2003-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
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.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _MeshVS_Tool_HeaderFile
17#define _MeshVS_Tool_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_DefineAlloc.hxx>
21#include <Standard_Handle.hxx>
22
23#include <Standard_Boolean.hxx>
24#include <TColStd_Array1OfReal.hxx>
25class Graphic3d_AspectFillArea3d;
26class MeshVS_Drawer;
27class Graphic3d_MaterialAspect;
28class Graphic3d_AspectLine3d;
29class Graphic3d_AspectMarker3d;
30class Graphic3d_AspectText3d;
31class gp_Vec;
32
33
34//! This class provides auxiliary methods to create differents aspects
35class MeshVS_Tool
36{
37public:
38
39 DEFINE_STANDARD_ALLOC
40
41
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);
44
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);
48
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);
51
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);
54
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);
57
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);
61
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);
65
66
67
68
69protected:
70
71
72
73
74
75private:
76
77
78
79
80
81};
82
83
84
85
86
87
88
89#endif // _MeshVS_Tool_HeaderFile