0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IGESGraph / IGESGraph_UniformRectGrid.cxx
CommitLineData
b311480e 1// Created by: CKY / Contract Toubro-Larsen
2// Copyright (c) 1993-1999 Matra Datavision
973c2be1 3// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
7fd59977 6//
d5f74e42 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
973c2be1 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.
7fd59977 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
16//--------------------------------------------------------------------
7fd59977 17//--------------------------------------------------------------------
18
42cf5bc1 19#include <gp_Pnt2d.hxx>
20#include <gp_Vec2d.hxx>
21#include <gp_XY.hxx>
22#include <IGESGraph_UniformRectGrid.hxx>
23#include <Standard_Type.hxx>
7fd59977 24
92efcf78 25IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_UniformRectGrid,IGESData_IGESEntity)
26
b311480e 27IGESGraph_UniformRectGrid::IGESGraph_UniformRectGrid () { }
7fd59977 28
29 void IGESGraph_UniformRectGrid::Init
30 (const Standard_Integer nbProps,
31 const Standard_Integer finite,
32 const Standard_Integer line,
33 const Standard_Integer weighted,
34 const gp_XY& aGridPoint,
35 const gp_XY& aGridSpacing,
36 const Standard_Integer pointsX,
37 const Standard_Integer pointsY)
38{
39 theNbPropertyValues = nbProps;
40 isItFinite = finite;
41 isItLine = line;
42 isItWeighted = weighted;
43 theGridPoint = aGridPoint;
44 theGridSpacing = aGridSpacing;
45 theNbPointsX = pointsX;
46 theNbPointsY = pointsY;
47 InitTypeAndForm(406,22);
48}
49
50 Standard_Integer IGESGraph_UniformRectGrid::NbPropertyValues () const
51{
52 return theNbPropertyValues;
53}
54
55 Standard_Boolean IGESGraph_UniformRectGrid::IsFinite () const
56{
57 return (isItFinite == 1);
58}
59
60 Standard_Boolean IGESGraph_UniformRectGrid::IsLine () const
61{
62 return (isItLine == 1);
63}
64
65 Standard_Boolean IGESGraph_UniformRectGrid::IsWeighted () const
66{
67 return (isItWeighted == 0);
68}
69
70 gp_Pnt2d IGESGraph_UniformRectGrid::GridPoint () const
71{
72 return ( gp_Pnt2d(theGridPoint) );
73}
74
75 gp_Vec2d IGESGraph_UniformRectGrid::GridSpacing () const
76{
77 return ( gp_Vec2d(theGridSpacing) );
78}
79
80 Standard_Integer IGESGraph_UniformRectGrid::NbPointsX () const
81{
82 return theNbPointsX;
83}
84
85 Standard_Integer IGESGraph_UniformRectGrid::NbPointsY () const
86{
87 return theNbPointsY;
88}