0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IGESSolid / IGESSolid_Torus.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-01-09
2// Created by: CKY / Contract Toubro-Larsen ( SIVA )
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _IGESSolid_Torus_HeaderFile
18#define _IGESSolid_Torus_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Real.hxx>
24#include <gp_XYZ.hxx>
25#include <IGESData_IGESEntity.hxx>
26class gp_XYZ;
27class gp_Pnt;
28class gp_Dir;
29
30
31class IGESSolid_Torus;
32DEFINE_STANDARD_HANDLE(IGESSolid_Torus, IGESData_IGESEntity)
33
34//! defines Torus, Type <160> Form Number <0>
35//! in package IGESSolid
36//! A Torus is a solid formed by revolving a circular disc
37//! about a specified coplanar axis.
38class IGESSolid_Torus : public IGESData_IGESEntity
39{
40
41public:
42
43
44 Standard_EXPORT IGESSolid_Torus();
45
46 //! This method is used to set the fields of the class Torus
47 //! - R1 : distance from center of torus to center
48 //! of circular disc to be revolved
49 //! - R2 : radius of circular disc
50 //! - aPoint : center point coordinates (default (0,0,0))
51 //! - anAxis : unit vector in axis direction (default (0,0,1))
52 Standard_EXPORT void Init (const Standard_Real R1, const Standard_Real R2, const gp_XYZ& aPoint, const gp_XYZ& anAxisdir);
53
54 //! returns the distance from the center of torus to the center of
55 //! the disc to be revolved
56 Standard_EXPORT Standard_Real MajorRadius() const;
57
58 //! returns the radius of the disc to be revolved
59 Standard_EXPORT Standard_Real DiscRadius() const;
60
61 //! returns the center of torus
62 Standard_EXPORT gp_Pnt AxisPoint() const;
63
64 //! returns the center of torus after applying TransformationMatrix
65 Standard_EXPORT gp_Pnt TransformedAxisPoint() const;
66
67 //! returns direction of the axis
68 Standard_EXPORT gp_Dir Axis() const;
69
70 //! returns direction of the axis after applying TransformationMatrix
71 Standard_EXPORT gp_Dir TransformedAxis() const;
72
73
74
75
92efcf78 76 DEFINE_STANDARD_RTTIEXT(IGESSolid_Torus,IGESData_IGESEntity)
42cf5bc1 77
78protected:
79
80
81
82
83private:
84
85
86 Standard_Real theR1;
87 Standard_Real theR2;
88 gp_XYZ thePoint;
89 gp_XYZ theAxis;
90
91
92};
93
94
95
96
97
98
99
100#endif // _IGESSolid_Torus_HeaderFile