blob: 77e948e5faaaac09c55387bedc5d905ea2031ed0 (
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
|
/***********************************************************************
FONCTION :
----------
Classe V3d_View :
HISTORIQUE DES MODIFICATIONS :
--------------------------------
22-10-01 : SAV ; Created
************************************************************************/
/*----------------------------------------------------------------------*/
/*
* Includes
*/
#include <V3d_View.jxx>
#define BUC61044 /* 25/10/01 SAV ; added functionality to control gl depth testing
from higher API */
#define BUC61045 /* 25/10/01 SAV ; added functionality to control gl lighting
from higher API */
void V3d_View::EnableDepthTest( const Standard_Boolean enable ) const
{
#ifdef BUC61044
MyView->EnableDepthTest( enable );
#endif
}
Standard_Boolean V3d_View::IsDepthTestEnabled() const
{
#ifdef BUC61044
return MyView->IsDepthTestEnabled();
#else
return Standard_True;
#endif
}
void V3d_View::EnableGLLight( const Standard_Boolean enable ) const
{
#ifdef BUC61045
MyView->EnableGLLight( enable );
#endif
}
Standard_Boolean V3d_View::IsGLLightEnabled() const
{
#ifdef BUC61045
return MyView->IsGLLightEnabled();
#else
return Standard_True;
#endif
}
void V3d_View::SetLayerMgr(const Handle(V3d_LayerMgr)& aMgr)
{
MyLayerMgr = aMgr;
}
void V3d_View::ColorScaleDisplay()
{
if ( MyLayerMgr.IsNull() )
MyLayerMgr = new V3d_LayerMgr( this );
MyLayerMgr->ColorScaleDisplay();
MustBeResized();
if ( !Window().IsNull() ) {
Standard_Integer aW( 0 ), aH( 0 );
Window()->Size( aW, aH );
Redraw( 0, 0, aW, aH );
}
}
void V3d_View::ColorScaleErase()
{
if ( !MyLayerMgr.IsNull() )
MyLayerMgr->ColorScaleErase();
}
Standard_Boolean V3d_View::ColorScaleIsDisplayed() const
{
Standard_Boolean aStatus = Standard_False;
if ( !MyLayerMgr.IsNull() )
aStatus = MyLayerMgr->ColorScaleIsDisplayed();
return aStatus;
}
Handle(Aspect_ColorScale) V3d_View::ColorScale() const
{
if ( MyLayerMgr.IsNull() ) {
Handle(V3d_View) that = this;
that->MyLayerMgr = new V3d_LayerMgr( this );
}
return MyLayerMgr->ColorScale();
}
|