Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
a6fd8d1f
Commit
a6fd8d1f
authored
Dec 01, 2011
by
Philippe Pébay
Browse files
Better coding style; format; documentation; for 2D mode
Change-Id: I795dc3e68ac8d60e1658c5f852b3802ea00f9ac3
parent
0a38bb62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Hybrid/vtkCubeAxesActor.cxx
View file @
a6fd8d1f
...
...
@@ -290,33 +290,28 @@ void vtkCubeAxesActor::SetUse2DMode( int val )
this
->
YAxes
[
i
]
->
SetUse2DMode
(
val
);
this
->
ZAxes
[
i
]
->
SetUse2DMode
(
val
);
}
if
(
val
==
0
)
if
(
!
val
)
{
this
->
SetZAxisVisibility
(
1
);
this
->
SetZAxisVisibility
(
1
);
}
else
{
this
->
SetZAxisVisibility
(
0
);
this
->
SetZAxisVisibility
(
0
);
}
}
//! return 1 if textactor is used
int
vtkCubeAxesActor
::
GetUse2DMode
()
{
//
we
assume that all axes have the same value
...
//
It is
assume
d
that all axes have the same value
return
this
->
XAxes
[
0
]
->
GetUse2DMode
();
}
/*! for 2D axis only : during the next render, the axis positions have to be save for later use.
\param val : the new state
\note
\li val = 0 : no need to save position (3D axis)
\li val = 1 : positions have to be saved during the next render pass
\li val = 2 : positions are saved -> used them
*/
void
vtkCubeAxesActor
::
SetSaveTitlePosition
(
int
val
)
{
// For 2D mode only :
// val = 0: no need to save position (3D axis)
// val = 1: positions have to be saved during the next render pass
// val = 2: positions are saved -> use them
for
(
int
i
=
0
;
i
<
4
;
++
i
)
{
this
->
XAxes
[
i
]
->
SetSaveTitlePosition
(
val
);
...
...
Hybrid/vtkCubeAxesActor.h
View file @
a6fd8d1f
...
...
@@ -366,11 +366,14 @@ public:
void
SetLabelScaling
(
bool
,
int
,
int
,
int
);
//! use textactor if val = 1 (2D) instead of follower (3D - val = 0) for title
// Description:
// Get/Set 2D mode
// NB: Use vtkTextActor for titles in 2D instead of vtkAxisFollower
void
SetUse2DMode
(
int
val
);
//! return 1 if textactor is used
int
GetUse2DMode
();
//! for 2D axis only : during the next render, the axis positions have to be save for later use.
// Description:
// For 2D mode only: save axis title positions for later use
void
SetSaveTitlePosition
(
int
val
);
protected:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment