summaryrefslogtreecommitdiff
path: root/src/IGESDraw/IGESDraw_View.cxx
blob: fd33b9b26174c32abb36b3737a4ed045c8dd171e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//--------------------------------------------------------------------
//
//  File Name : IGESDraw_View.cxx
//  Date      :
//  Author    : CKY / Contract Toubro-Larsen
//  Copyright : MATRA-DATAVISION 1993
//
//--------------------------------------------------------------------

#include <IGESDraw_View.ixx>
#include <gp_GTrsf.hxx>


    IGESDraw_View::IGESDraw_View ()    {  }


// This class inherits from IGESData_ViewKindEntity

    void IGESDraw_View::Init
  (const Standard_Integer        aViewNum,
   const Standard_Real           aScale,
   const Handle(IGESGeom_Plane)& aLeftPlane,
   const Handle(IGESGeom_Plane)& aTopPlane,
   const Handle(IGESGeom_Plane)& aRightPlane,
   const Handle(IGESGeom_Plane)& aBottomPlane,
   const Handle(IGESGeom_Plane)& aBackPlane,
   const Handle(IGESGeom_Plane)& aFrontPlane)
{
  theViewNumber  = aViewNum;
  theScaleFactor = aScale;
  theLeftPlane   = aLeftPlane;
  theTopPlane    = aTopPlane;
  theRightPlane  = aRightPlane;
  theBottomPlane = aBottomPlane;
  theBackPlane   = aBackPlane;
  theFrontPlane  = aFrontPlane;
  InitTypeAndForm(410,0);
}

    Standard_Boolean IGESDraw_View::IsSingle () const
{
  return Standard_True;
  // Redefined to return TRUE
}

    Standard_Integer IGESDraw_View::NbViews () const
{  return 1;  }

    Handle(IGESData_ViewKindEntity)  IGESDraw_View::ViewItem
  (const Standard_Integer) const
{  return Handle(IGESData_ViewKindEntity)::DownCast (This());  }


    Standard_Integer IGESDraw_View::ViewNumber () const
{
  return theViewNumber;
}

    Standard_Real IGESDraw_View::ScaleFactor () const
{
  return theScaleFactor;
}

    Standard_Boolean IGESDraw_View::HasLeftPlane () const
{
  return  (! theLeftPlane.IsNull());
}

    Handle(IGESGeom_Plane) IGESDraw_View::LeftPlane () const
{
  return  theLeftPlane;
}

    Standard_Boolean IGESDraw_View::HasTopPlane () const
{
  return  (! theTopPlane.IsNull());
}

    Handle(IGESGeom_Plane) IGESDraw_View::TopPlane () const
{
  return  theTopPlane;
}

    Standard_Boolean IGESDraw_View::HasRightPlane () const
{
  return  (! theRightPlane.IsNull());
}

    Handle(IGESGeom_Plane) IGESDraw_View::RightPlane () const
{
  return  theRightPlane;
}

    Standard_Boolean IGESDraw_View::HasBottomPlane () const
{
  return  (! theBottomPlane.IsNull());
}

    Handle(IGESGeom_Plane) IGESDraw_View::BottomPlane () const
{
  return  theBottomPlane;
}

    Standard_Boolean IGESDraw_View::HasBackPlane () const
{
  return  (! theBackPlane.IsNull());
}

    Handle(IGESGeom_Plane) IGESDraw_View::BackPlane () const
{
  return  theBackPlane;
}

    Standard_Boolean IGESDraw_View::HasFrontPlane () const
{
  return  (! theFrontPlane.IsNull());
}

    Handle(IGESGeom_Plane) IGESDraw_View::FrontPlane () const
{
  return  theFrontPlane;
}

    Handle(IGESData_TransfEntity) IGESDraw_View::ViewMatrix () const
{
  return (Transf());
}

    gp_XYZ IGESDraw_View::ModelToView (const gp_XYZ& coords) const
{
  gp_XYZ tempCoords = coords;
  Location().Transforms(tempCoords);
  return (tempCoords);
}