b311480e |
1 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
2 | // |
3 | // The content of this file is subject to the Open CASCADE Technology Public |
4 | // License Version 6.5 (the "License"). You may not use the content of this file |
5 | // except in compliance with the License. Please obtain a copy of the License |
6 | // at http://www.opencascade.org and read it completely before using this file. |
7 | // |
8 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
9 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
10 | // |
11 | // The Original Code and all software distributed under the License is |
12 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
13 | // Initial Developer hereby disclaims all such warranties, including without |
14 | // limitation, any warranties of merchantability, fitness for a particular |
15 | // purpose or non-infringement. Please see the License for the specific terms |
16 | // and conditions governing the rights and limitations under the License. |
17 | |
7fd59977 |
18 | #include <V3d_Viewer.jxx> |
19 | #include <V3d.hxx> |
20 | void V3d_Viewer::InitActiveViews() { |
21 | myActiveViewsIterator.Initialize(MyActiveViews); |
22 | } |
23 | Standard_Boolean V3d_Viewer::MoreActiveViews () const { |
24 | return myActiveViewsIterator.More(); |
25 | } |
26 | void V3d_Viewer::NextActiveViews () { |
27 | if(!MyActiveViews.IsEmpty())myActiveViewsIterator.Next(); |
28 | } |
29 | Handle(V3d_View) V3d_Viewer::ActiveView() const { |
30 | return (Handle(V3d_View)&)(myActiveViewsIterator.Value());} |
31 | |
32 | Standard_Boolean V3d_Viewer::LastActiveView() const { |
33 | return MyActiveViews.Extent() == 1;} |
34 | |
35 | Standard_Boolean V3d_Viewer::IsActive(const Handle(V3d_View)& aView) const { |
36 | return MyActiveViews.Contains(aView); |
37 | } |
38 | void V3d_Viewer::InitDefinedViews() { |
39 | myDefinedViewsIterator.Initialize(MyDefinedViews); |
40 | } |
41 | Standard_Boolean V3d_Viewer::MoreDefinedViews () const { |
42 | return myDefinedViewsIterator.More(); |
43 | } |
44 | void V3d_Viewer::NextDefinedViews () { |
45 | if(!MyDefinedViews.IsEmpty())myDefinedViewsIterator.Next(); |
46 | } |
47 | Handle(V3d_View) V3d_Viewer::DefinedView() const { |
48 | return (Handle(V3d_View)&)(myDefinedViewsIterator.Value());} |
49 | |
50 | void V3d_Viewer::InitActiveLights() { |
51 | myActiveLightsIterator.Initialize(MyActiveLights); |
52 | } |
53 | Standard_Boolean V3d_Viewer::MoreActiveLights () const { |
54 | return myActiveLightsIterator.More(); |
55 | } |
56 | void V3d_Viewer::NextActiveLights () { |
57 | myActiveLightsIterator.Next(); |
58 | } |
59 | Handle(V3d_Light) V3d_Viewer::ActiveLight() const { |
60 | return (Handle(V3d_Light)&)(myActiveLightsIterator.Value());} |
61 | |
62 | void V3d_Viewer::InitDefinedLights() { |
63 | myDefinedLightsIterator.Initialize(MyDefinedLights); |
64 | } |
65 | Standard_Boolean V3d_Viewer::MoreDefinedLights () const { |
66 | return myDefinedLightsIterator.More(); |
67 | } |
68 | void V3d_Viewer::NextDefinedLights () { |
69 | if(!MyDefinedLights.IsEmpty())myDefinedLightsIterator.Next(); |
70 | } |
71 | Handle(V3d_Light) V3d_Viewer::DefinedLight() const { |
72 | return (Handle(V3d_Light)&)(myDefinedLightsIterator.Value());} |
73 | |
74 | void V3d_Viewer::InitDefinedPlanes() { |
75 | myDefinedPlanesIterator.Initialize(MyDefinedPlanes); |
76 | } |
77 | Standard_Boolean V3d_Viewer::MoreDefinedPlanes () const { |
78 | return myDefinedPlanesIterator.More(); |
79 | } |
80 | void V3d_Viewer::NextDefinedPlanes () { |
81 | myDefinedPlanesIterator.Next(); |
82 | } |
83 | Handle(V3d_Plane) V3d_Viewer::DefinedPlane() const { |
84 | return (Handle(V3d_Plane)&)(myDefinedPlanesIterator.Value());} |
85 | |