1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
18 #include <V3d_Viewer.jxx>
20 void V3d_Viewer::InitActiveViews() {
21 myActiveViewsIterator.Initialize(MyActiveViews);
23 Standard_Boolean V3d_Viewer::MoreActiveViews () const {
24 return myActiveViewsIterator.More();
26 void V3d_Viewer::NextActiveViews () {
27 if(!MyActiveViews.IsEmpty())myActiveViewsIterator.Next();
29 Handle(V3d_View) V3d_Viewer::ActiveView() const {
30 return (Handle(V3d_View)&)(myActiveViewsIterator.Value());}
32 Standard_Boolean V3d_Viewer::LastActiveView() const {
33 return MyActiveViews.Extent() == 1;}
35 Standard_Boolean V3d_Viewer::IsActive(const Handle(V3d_View)& aView) const {
36 return MyActiveViews.Contains(aView);
38 void V3d_Viewer::InitDefinedViews() {
39 myDefinedViewsIterator.Initialize(MyDefinedViews);
41 Standard_Boolean V3d_Viewer::MoreDefinedViews () const {
42 return myDefinedViewsIterator.More();
44 void V3d_Viewer::NextDefinedViews () {
45 if(!MyDefinedViews.IsEmpty())myDefinedViewsIterator.Next();
47 Handle(V3d_View) V3d_Viewer::DefinedView() const {
48 return (Handle(V3d_View)&)(myDefinedViewsIterator.Value());}
50 void V3d_Viewer::InitActiveLights() {
51 myActiveLightsIterator.Initialize(MyActiveLights);
53 Standard_Boolean V3d_Viewer::MoreActiveLights () const {
54 return myActiveLightsIterator.More();
56 void V3d_Viewer::NextActiveLights () {
57 myActiveLightsIterator.Next();
59 Handle(V3d_Light) V3d_Viewer::ActiveLight() const {
60 return (Handle(V3d_Light)&)(myActiveLightsIterator.Value());}
62 void V3d_Viewer::InitDefinedLights() {
63 myDefinedLightsIterator.Initialize(MyDefinedLights);
65 Standard_Boolean V3d_Viewer::MoreDefinedLights () const {
66 return myDefinedLightsIterator.More();
68 void V3d_Viewer::NextDefinedLights () {
69 if(!MyDefinedLights.IsEmpty())myDefinedLightsIterator.Next();
71 Handle(V3d_Light) V3d_Viewer::DefinedLight() const {
72 return (Handle(V3d_Light)&)(myDefinedLightsIterator.Value());}