Commit a6fd8d1f authored by Philippe Pébay's avatar Philippe Pébay
Browse files

Better coding style; format; documentation; for 2D mode

Change-Id: I795dc3e68ac8d60e1658c5f852b3802ea00f9ac3
parent 0a38bb62
......@@ -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 assumed 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 );
......
......@@ -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:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment