Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Mark Olesen
2016-06-23 16:16:38 +02:00
4 changed files with 9 additions and 8 deletions

View File

@ -244,7 +244,8 @@ void Foam::fieldVisualisationBase::setField
const scalar position,
const word& colourFieldName,
vtkPolyDataMapper* mapper,
vtkRenderer* renderer
vtkRenderer* renderer,
vtkPolyData* pData
) const
{
mapper->InterpolateScalarsBeforeMappingOn();
@ -269,7 +270,6 @@ void Foam::fieldVisualisationBase::setField
mapper->SetScalarRange(range_.first(), range_.second());
// Set to use either cell or point data
vtkPolyData* pData = mapper->GetInput();
const char* fieldName = colourFieldName.c_str();
if (pData->GetCellData()->HasArray(fieldName) == 1)
{
@ -439,7 +439,7 @@ void Foam::fieldVisualisationBase::addGlyphs
{
glyph->Update();
setField(position, colourFieldName, glyphMapper, renderer);
setField(position, colourFieldName, glyphMapper, renderer, data);
glyphMapper->Update();

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -158,7 +158,8 @@ protected:
const scalar position,
const word& colourFieldName,
vtkPolyDataMapper* mapper,
vtkRenderer* renderer
vtkRenderer* renderer,
vtkPolyData* pData
) const;
//- Add glyphs

View File

@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
\\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -110,7 +110,7 @@ void Foam::functionObjectLine::addGeometryToScene
vtkSmartPointer<vtkPolyDataMapper> mapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
setField(position, fieldName_, mapper, renderer);
setField(position, fieldName_, mapper, renderer, lines->GetOutput());
actor_->SetMapper(mapper);

View File

@ -137,7 +137,7 @@ void Foam::functionObjectSurface::addGeometryToScene
vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(surf->GetOutputPort());
setField(position, fieldName_, mapper, renderer);
setField(position, fieldName_, mapper, renderer, surf->GetOutput());
surfaceActor_->SetMapper(mapper);