0025137: The methods "Convert" point defined in the reference frame of the view into...
[occt.git] / src / V3d / V3d_Viewer_1.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #include <V3d_Viewer.jxx>
15 #include <V3d.hxx>
16 void V3d_Viewer::InitActiveViews() {
17 myActiveViewsIterator.Initialize(MyActiveViews);
18 }
19 Standard_Boolean V3d_Viewer::MoreActiveViews () const {
20   return myActiveViewsIterator.More();
21 }
22 void V3d_Viewer::NextActiveViews () {
23   if(!MyActiveViews.IsEmpty())myActiveViewsIterator.Next();
24 }
25 Handle(V3d_View) V3d_Viewer::ActiveView() const {
26   return (Handle(V3d_View)&)(myActiveViewsIterator.Value());}
27
28 Standard_Boolean V3d_Viewer::LastActiveView() const {
29   return MyActiveViews.Extent() == 1;}
30
31 Standard_Boolean V3d_Viewer::IsActive(const Handle(V3d_View)& aView) const {
32   return MyActiveViews.Contains(aView);
33 }
34 void V3d_Viewer::InitDefinedViews() {
35 myDefinedViewsIterator.Initialize(MyDefinedViews);
36 }
37 Standard_Boolean V3d_Viewer::MoreDefinedViews () const {
38   return myDefinedViewsIterator.More();
39 }
40 void V3d_Viewer::NextDefinedViews () {
41   if(!MyDefinedViews.IsEmpty())myDefinedViewsIterator.Next();
42 }
43 Handle(V3d_View) V3d_Viewer::DefinedView() const {
44   return (Handle(V3d_View)&)(myDefinedViewsIterator.Value());}
45
46 void V3d_Viewer::InitActiveLights() {
47 myActiveLightsIterator.Initialize(MyActiveLights);
48 }
49 Standard_Boolean V3d_Viewer::MoreActiveLights () const {
50   return myActiveLightsIterator.More();
51 }
52 void V3d_Viewer::NextActiveLights () {
53   myActiveLightsIterator.Next();
54 }
55 Handle(V3d_Light) V3d_Viewer::ActiveLight() const {
56   return (Handle(V3d_Light)&)(myActiveLightsIterator.Value());}
57
58 void V3d_Viewer::InitDefinedLights() {
59 myDefinedLightsIterator.Initialize(MyDefinedLights);
60 }
61 Standard_Boolean V3d_Viewer::MoreDefinedLights () const {
62   return myDefinedLightsIterator.More();
63 }
64 void V3d_Viewer::NextDefinedLights () {
65   if(!MyDefinedLights.IsEmpty())myDefinedLightsIterator.Next();
66 }
67 Handle(V3d_Light) V3d_Viewer::DefinedLight() const {
68   return (Handle(V3d_Light)&)(myDefinedLightsIterator.Value());}