0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IGESBasic / IGESBasic_SingularSubfigure.hxx
1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( Arun MENON )
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 _IGESBasic_SingularSubfigure_HeaderFile
18 #define _IGESBasic_SingularSubfigure_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <gp_XYZ.hxx>
24 #include <Standard_Real.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 class IGESBasic_SubfigureDef;
28 class gp_XYZ;
29
30
31 class IGESBasic_SingularSubfigure;
32 DEFINE_STANDARD_HANDLE(IGESBasic_SingularSubfigure, IGESData_IGESEntity)
33
34 //! defines SingularSubfigure, Type <408> Form <0>
35 //! in package IGESBasic
36 //! Defines the occurrence of a single instance of the
37 //! defined Subfigure.
38 class IGESBasic_SingularSubfigure : public IGESData_IGESEntity
39 {
40
41 public:
42
43   
44   Standard_EXPORT IGESBasic_SingularSubfigure();
45   
46   //! This method is used to set the fields of the class
47   //! SingularSubfigure
48   //! - aSubfigureDef : the Subfigure Definition entity
49   //! - aTranslation  : used to store the X,Y,Z coord
50   //! - hasScale      : Indicates the presence of scale factor
51   //! - aScale        : Used to store the scale factor
52   Standard_EXPORT void Init (const Handle(IGESBasic_SubfigureDef)& aSubfigureDef, const gp_XYZ& aTranslation, const Standard_Boolean hasScale, const Standard_Real aScale);
53   
54   //! returns the subfigure definition entity
55   Standard_EXPORT Handle(IGESBasic_SubfigureDef) Subfigure() const;
56   
57   //! returns the X, Y, Z coordinates
58   Standard_EXPORT gp_XYZ Translation() const;
59   
60   //! returns the scale factor
61   //! if hasScaleFactor is False, returns 1.0 (default)
62   Standard_EXPORT Standard_Real ScaleFactor() const;
63   
64   //! returns a boolean indicating whether scale factor
65   //! is present or not
66   Standard_EXPORT Standard_Boolean HasScaleFactor() const;
67   
68   //! returns the Translation after transformation
69   Standard_EXPORT gp_XYZ TransformedTranslation() const;
70
71
72
73
74   DEFINE_STANDARD_RTTIEXT(IGESBasic_SingularSubfigure,IGESData_IGESEntity)
75
76 protected:
77
78
79
80
81 private:
82
83
84   Handle(IGESBasic_SubfigureDef) theSubfigureDef;
85   gp_XYZ theTranslation;
86   Standard_Real theScaleFactor;
87   Standard_Boolean hasScaleFactor;
88
89
90 };
91
92
93
94
95
96
97
98 #endif // _IGESBasic_SingularSubfigure_HeaderFile