Commit a643746a authored by allens's avatar allens

minro changes here and there

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@16441 18c085ea-50e0-402c-830e-de6fd14e8384
parent d01300a9
......@@ -148,7 +148,7 @@
0.000000
</Field>
<Field name="arrayPlotOffset" label="1D plot array offset" type="double">
1.000000
0.000000
</Field>
<Field name="displayTime" label="View time" type="enum" subtype="DisplayTime">
Step
......
......@@ -644,7 +644,7 @@ void LineSamplerAttributes::Init()
viewDimension = Three;
heightPlotScale = 1;
channelPlotOffset = 0;
arrayPlotOffset = 1;
arrayPlotOffset = 0;
displayTime = Step;
channelGeometry = Line;
radius = 0.1;
......
......@@ -149,7 +149,7 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
viewDimension = VIEWDIMENSION_THREE;
heightPlotScale = 1;
channelPlotOffset = 0;
arrayPlotOffset = 1;
arrayPlotOffset = 0;
displayTime = DISPLAYTIME_STEP;
channelGeometry = CHANNELGEOMETRY_LINE;
radius = 0.1;
......@@ -213,7 +213,7 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
viewDimension = VIEWDIMENSION_THREE;
heightPlotScale = 1;
channelPlotOffset = 0;
arrayPlotOffset = 1;
arrayPlotOffset = 0;
displayTime = DISPLAYTIME_STEP;
channelGeometry = CHANNELGEOMETRY_LINE;
radius = 0.1;
......
......@@ -839,7 +839,7 @@ QvisLineSamplerWindow::CreateWindowContents()
// Create the oneDPlot group box.
oneDPlotGroup = new QGroupBox(viewTab);
oneDPlotGroup->setTitle(tr("1D Plot viewing parameters"));
oneDPlotGroup->setTitle(tr("1D plot viewing parameters"));
mainLayout->addWidget(oneDPlotGroup, 1, 0, 4, 4);
QGridLayout *oneDPlotLayout = new QGridLayout(oneDPlotGroup);
......@@ -847,7 +847,7 @@ QvisLineSamplerWindow::CreateWindowContents()
oneDPlotLayout->setSpacing(10);
heightPlotScaleLabel = new QLabel(tr("1D Plot Height scale"), central);
heightPlotScaleLabel = new QLabel(tr("1D plot height scale"), central);
oneDPlotLayout->addWidget(heightPlotScaleLabel,0,0);
heightPlotScale = new QLineEdit(central);
heightPlotScale->setMaximumWidth(width);
......@@ -855,7 +855,7 @@ QvisLineSamplerWindow::CreateWindowContents()
this, SLOT(heightPlotScaleProcessText()));
oneDPlotLayout->addWidget(heightPlotScale, 0,1);
channelPlotOffsetLabel = new QLabel(tr("1D Plot Channel offset"), central);
channelPlotOffsetLabel = new QLabel(tr("1D plot channel offset"), central);
oneDPlotLayout->addWidget(channelPlotOffsetLabel,1,0);
channelPlotOffset = new QLineEdit(central);
channelPlotOffset->setMaximumWidth(width);
......@@ -863,7 +863,7 @@ QvisLineSamplerWindow::CreateWindowContents()
this, SLOT(channelPlotOffsetProcessText()));
oneDPlotLayout->addWidget(channelPlotOffset,1,1);
arrayPlotOffsetLabel = new QLabel(tr("1D Plot Array offset"), central);
arrayPlotOffsetLabel = new QLabel(tr("1D plot array offset"), central);
oneDPlotLayout->addWidget(arrayPlotOffsetLabel,2,0);
arrayPlotOffset = new QLineEdit(central);
arrayPlotOffset->setMaximumWidth(width);
......
......@@ -494,8 +494,25 @@ avtLineSamplerFilter::Execute()
newCellIndex++;
if( atts.GetViewGeometry() == LineSamplerAttributes::Points )
{
vtkIdType* pointList = new vtkIdType[1];
pointList[0] = newPointIndex;
uGrid->InsertNextCell(VTK_VERTEX, 1, pointList);
for( unsigned int j=0; j<allCellData->GetNumberOfArrays(); j++)
{
allCellData->GetArray(j)->
InsertTuple( newCellIndex, currCellData->GetArray(j)->GetTuple(i) );
}
newCellIndex++;
delete[] pointList;
}
// Add a new line segment
if( tPoints )
else if( tPoints )
{
//define the points of the lines
vtkIdType* pointList = new vtkIdType[2];
......@@ -926,12 +943,12 @@ avtLineSamplerFilter::ExecuteChannelData(vtkDataSet *in_ds, int, std::string)
// Poloidal plane x axis tilting.
if( atts.GetArrayConfiguration() == LineSamplerAttributes::Geometry &&
rTilt )
rTilt != 0.0)
transform->RotateX( rTilt );
// Poloidal plane z axis tilting.
if( atts.GetArrayConfiguration() == LineSamplerAttributes::Geometry &&
zTilt )
zTilt != 0.0 )
transform->RotateZ( zTilt );
// Toroidal rotation.
......@@ -975,7 +992,7 @@ avtLineSamplerFilter::ExecuteChannelData(vtkDataSet *in_ds, int, std::string)
checkWall( startPoint, stopPoint );
if( atts.GetArrayConfiguration() == LineSamplerAttributes::Geometry &&
(rTilt || zTilt) )
(rTilt != 0.0 || zTilt != 0.0) )
{
std::string msg;
msg += "Clipping against the wall requires that there be no " +
......@@ -989,7 +1006,7 @@ avtLineSamplerFilter::ExecuteChannelData(vtkDataSet *in_ds, int, std::string)
// Poloidal plane R Tilting.
if( atts.GetArrayConfiguration() == LineSamplerAttributes::Geometry &&
rTilt )
rTilt != 0.0 )
{
transform->Identity();
transform->Translate( -r, -0, -z );
......@@ -1002,7 +1019,7 @@ avtLineSamplerFilter::ExecuteChannelData(vtkDataSet *in_ds, int, std::string)
// Poloidal plane Z Tilting.
if( atts.GetArrayConfiguration() == LineSamplerAttributes::Geometry &&
zTilt )
zTilt != 0.0 )
{
transform->Identity();
transform->Translate( -r, -0, -z );
......@@ -1900,28 +1917,28 @@ avtLineSamplerFilter::checkBounds( vtkDataSet *in_ds,
avtVector &startPoint,
avtVector &stopPoint )
{
avtVector axis = stopPoint - startPoint;
axis.normalize();
double bounds[6];
in_ds->GetBounds(bounds);
// For cylindircal the extent is at R = 0, Y = 0.
if( atts.GetMeshGeometry() == LineSamplerAttributes::Toroidal )
{
if( startPoint.x >= 0 && startPoint.y >= 0 )
bounds[0] = bounds[2] = 0;
else if( startPoint.x >= 0 && startPoint.y < 0 )
bounds[0] = bounds[3] = 0;
else if( startPoint.x < 0 && startPoint.y >= 0 )
bounds[1] = bounds[2] = 0;
else if( startPoint.x < 0 && startPoint.y < 0 )
bounds[1] = bounds[3] = 0;
if( startPoint.x > 0 && axis.x < 0 )
bounds[0] = 0;
else if( startPoint.y > 0 && axis.y < 0 )
bounds[2] = 0;
else if( startPoint.x < 0 && axis.x > 0 )
bounds[0] = 0;
else if( startPoint.y < 0 && axis.y > 0 )
bounds[2] = 0;
}
avtVector axis = stopPoint - startPoint;
axis.normalize();
// std::cerr << __LINE__ << " axis " << axis << std::endl;
// std::cerr << __LINE__ << " axis " << axis << std::endl;
// std::cerr << __LINE__ << " stopPoint " << stopPoint << std::endl;
// std::cerr << __LINE__ << " stopPoint " << stopPoint << std::endl;
// Check against the R axis first.
if( axis != avtVector( 1, 0, 0 ) && axis != avtVector( -1, 0, 0 ) )
......@@ -1973,6 +1990,7 @@ avtLineSamplerFilter::checkBounds( vtkDataSet *in_ds,
// Max Y plane
else if( axis.y >= 0 )
stopPoint.y = bounds[3];
// std::cerr << __LINE__ << " stopPoint " << stopPoint << std::endl;
}
}
......@@ -2009,6 +2027,7 @@ avtLineSamplerFilter::checkBounds( vtkDataSet *in_ds,
// Max Z plane
else if( axis.z >= 0 )
stopPoint.z = bounds[5];
// std::cerr << __LINE__ << " stopPoint " << stopPoint << std::endl;
}
}
......@@ -2019,6 +2038,8 @@ avtLineSamplerFilter::checkBounds( vtkDataSet *in_ds,
{
stopPoint = startPoint;
// std::cerr << __LINE__ << " stopPoint " << stopPoint << std::endl;
// For cylindircal the extent is at R = 0.
if( atts.GetMeshGeometry() == LineSamplerAttributes::Toroidal &&
((startPoint.x >= 0 && axis.x < 0) ||
......@@ -2030,6 +2051,8 @@ avtLineSamplerFilter::checkBounds( vtkDataSet *in_ds,
// Max R plane
else if( axis.x >= 0 )
stopPoint.x = bounds[1];
// std::cerr << __LINE__ << " stopPoint " << stopPoint << std::endl;
}
}
......
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