Commit dc17d61a authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[CHANGE] adapted name, order and documentation of properties ralting to the...

[CHANGE] adapted name, order and documentation of properties ralting to the rendering of this module
parent ae552f2f
......@@ -111,9 +111,6 @@ void WMPickingDVR::properties()
WPropertyHelper::PC_SELECTONLYONE::addTo( m_selectionType );
WPropertyHelper::PC_NOTEMPTY::addTo( m_selectionType );
//Color Property
m_color = m_properties->addProperty( "Crosshair color", "Crosshair Color", WColor( 0.5f, 0.5f, 0.5f, 1.0f ), m_propCondition );
m_sampleSteps = m_properties->addProperty( "Samples - steps",
"Number of samples. Choose this appropriately for the settings used for the DVR itself.",
256,
......@@ -127,11 +124,23 @@ void WMPickingDVR::properties()
true,
m_propCondition );
m_crossThickness = m_properties->addProperty( "Crosshair thickness", "Crosshair thickness", 0.5, m_propCondition );
m_crossThickness->setMin( 0.001 );
m_crossThickness->setMax( 1.0 );
m_crossSize = m_properties->addProperty( "Crosshair size", "Crosshair size", 100.0, m_propCondition );
m_lineColor = m_properties->addProperty( "Line color",
"Color of line/s indicating selected position/s.",
WColor( 0.5f, 0.5f, 0.5f, 1.0f ),
m_propCondition );
m_lineThickness = m_properties->addProperty( "Line thickness",
"Thickness of line/s indicating selected position/s.",
0.5,
m_propCondition );
m_lineThickness->setMin( 0.001 );
m_lineThickness->setMax( 5.0 );
m_crossSize = m_properties->addProperty( "Crosshair size",
"Length of crosshair lines.",
100.0,
m_propCondition );
m_crossSize->setMin( 0.001 );
m_crossSize->setMax( 1000.0 );
......@@ -335,13 +344,11 @@ void WMPickingDVR::updateModuleGUI( std::string strRenderMode )
if( picking )
{
m_pickingCriteriaCur->setHidden( false );
m_crossThickness->setHidden( false );
m_crossSize->setHidden( false );
}
else
{
m_pickingCriteriaCur->setHidden( true );
m_crossThickness->setHidden( true );
m_crossSize->setHidden( true );
}
}
......@@ -399,7 +406,7 @@ std::pair<int, int> WMPickingDVR::calculateIntervalsWYSIWYP( const std::vector<d
{
//Calculate diff
diff = vecAlphaAcc[vecIndicesUpperBounds[j]] - vecAlphaAcc[vecIndicesLowerBounds[j]];
debugLog() << "Interval [" << vecIndicesLowerBounds[j] << "," << vecIndicesUpperBounds[j] << "] = " << diff;
//debugLog() << "Interval [" << vecIndicesLowerBounds[j] << "," << vecIndicesUpperBounds[j] << "] = " << diff;
//Is Max Diff
if( diff > maxDiff )
......@@ -409,7 +416,7 @@ std::pair<int, int> WMPickingDVR::calculateIntervalsWYSIWYP( const std::vector<d
sampleUp = vecIndicesUpperBounds[j];
}
}
debugLog() << "Start of largest interval " << sampleLo;
//debugLog() << "Start of largest interval " << sampleLo;
return std::make_pair( sampleLo, sampleUp );
}
......@@ -532,15 +539,15 @@ void WMPickingDVR::updatePositionIndicator( osg::Vec3f position )
osg::ref_ptr< osg::Geode > geode( new osg::Geode );
const double size = m_crossSize->get();
const double thickness = m_crossThickness->get();
const double thickness = m_lineThickness->get();
osg::ShapeDrawable* pBoxX = new osg::ShapeDrawable( new osg::Box( position, size, thickness, thickness ) );
osg::ShapeDrawable* pBoxY = new osg::ShapeDrawable( new osg::Box( position, thickness, size, thickness ) );
osg::ShapeDrawable* pBoxZ = new osg::ShapeDrawable( new osg::Box( position, thickness, thickness, size ) );
pBoxX->setColor( m_color->get() );
pBoxY->setColor( m_color->get() );
pBoxZ->setColor( m_color->get() );
pBoxX->setColor( m_lineColor->get() );
pBoxY->setColor( m_lineColor->get() );
pBoxZ->setColor( m_lineColor->get() );
geode->addDrawable( pBoxX );
geode->addDrawable( pBoxY );
......@@ -748,9 +755,9 @@ WPosition WMPickingDVR::getPickedDVRPosition( std::string pickingMode, bool* pi
if( *pickingSuccess )
{
debugLog() << "[pickedAlpha = " << pickedAlpha << "]"
<< "[posPicking][X = " << posPicking.x() << " ]"
<< "[Y = " << posPicking.y() << " ][Z = " << posPicking.z() << "]";
// debugLog() << "[pickedAlpha = " << pickedAlpha << "]"
// << "[posPicking][X = " << posPicking.x() << " ]"
// << "[Y = " << posPicking.y() << " ][Z = " << posPicking.z() << "]";
}
return posPicking;
......@@ -803,7 +810,7 @@ void WMPickingDVR::updateCurveRendering()
if( line.size() > 1 )
{
m_rootNode->remove( m_geode );
m_geode = generateLineStripGeode( line, 5.0, m_color->get() );
m_geode = generateLineStripGeode( line, m_lineThickness->get(), m_lineColor->get() );
m_rootNode->clear();
m_rootNode->insert( m_geode );
......
......@@ -196,23 +196,14 @@ private:
*/
boost::shared_ptr< WCondition > m_propCondition;
/**
* Trigger Property, will be triggered by the pickhandler
*/
WPropBool m_triggerCalculation;
WPropBool m_triggerCalculation; //!< Trigger Property, will be triggered by the pickhandle
WPropSelection m_selectionType; //!< Property determining what type of structure will be selected
boost::shared_ptr< WItemSelection > m_selectionTypesList; //!< List of selection types for \ref m_selectionType
/**
* Color Property:
*/
WPropColor m_color;
WPropColor m_lineColor; //!< Color of line/s indicating selected position/s
/**
* Number of samples along the ray
*/
WPropInt m_sampleSteps;
WPropInt m_sampleSteps; //!< Number of samples along the ray
/**
* If active, the opacity of the classified fragment gets scaled according to sample count to ensure relative opacities even if sampling
......@@ -220,55 +211,25 @@ private:
*/
WPropBool m_opacityCorrectionEnabled;
/**
* Double Property: Alpha Value and alpha Percentage
*/
WPropDouble m_alphaThreshold;
WPropDouble m_alphaThreshold; //!< Alpha value and alpha percentage
/**
* Double Property: Picking Crosshair Thinkness
*/
WPropDouble m_crossThickness;
WPropDouble m_lineThickness; //!< Thinkness of line/s indicating selected position/s
/**
* Double Property: Picking Crosshair Size
*/
WPropDouble m_crossSize;
WPropDouble m_crossSize; //!< Picking crosshair length of lines
/**
* Current picking method
*/
WPropSelection m_pickingCriteriaCur;
WPropSelection m_pickingCriteriaCur; //!< Current picking method
/**
* Possible criteria
*/
boost::shared_ptr< WItemSelection > m_pickingCriteriaList;
boost::shared_ptr< WItemSelection > m_pickingCriteriaList; //!< Possible picking criteria for \ref m_pickingCriteriaCur
/**
* Selecting the type of position obtained by WYSIWYP
*/
WPropSelection m_wysiwypPositionType;
WPropSelection m_wysiwypPositionType; //!< Selecting the type of position obtained by WYSIWYP
/**
* Possible position types for WYSIWYP
*/
boost::shared_ptr< WItemSelection > m_wysiwypPositionTypesList;
boost::shared_ptr< WItemSelection > m_wysiwypPositionTypesList; //!< Possible position types for WYSIWYP
/**
* Intersection position start
*/
osg::Vec3f m_posStart;
osg::Vec3f m_posStart; //!< Intersection position start
/**
* Intersection position end
*/
osg::Vec3f m_posEnd;
osg::Vec3f m_posEnd; //!< Intersection position end
/**
* Boolean to check if the intersected positions are valid
*/
bool m_intersected;
bool m_intersected; //!< Indicates if intersected positions are valid
bool m_pickInProgress; //!< Indicates whether continouos picking is still in progress.
......
Markdown is supported
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